Compare commits

..

2 commits

Author SHA1 Message Date
3368a8651d Separated into Computers/Users/Groups 2023-07-30 13:57:40 -05:00
ad2d7d35a5 Added two new commands 2023-07-30 13:54:26 -05:00

View file

@ -4,6 +4,10 @@ Note: unless otherwise stated, replace any variable such as `$ComputerName` with
<br>
## Computers
<br>
### Remotely Fetch a (Partial) Installed Program List for $ComputerName
```powershell
@ -20,14 +24,6 @@ Get-WmiObject win32_product -ComputerName $ComputerName | Where-Object {$_.$Colu
<br>
### Fetch AD Groups with $SearchTerm in them
```powershell
Get-ADGroup -Filter 'name -like "*$SearchTerm*"' | Sort-Object | select Name
```
<br>
### Remotely Fetch $ComputerName's Boot Time
```powershell
@ -44,6 +40,40 @@ Get-ADPrincipalGroupMembership (Get-ADComputer $ComputerName) | select-object na
<br>
### Remotely Fetch $ComputerName's Make & Model
```powershell
Get-CimInstance -ComputerName $ComputerName -ClassName Win32_ComputerSystem | Select-Object -Property Manufacturer, Model
```
<br>
### Remotely Fetch $ComputerName's Serial Number
```powershell
Get-CimInstance -ComputerName $ComputerName -ClassName Win32_bios | Select-Object -Property SerialNumber
```
<br>
### Remotely Fetch $ComputerName's Total/Free Storage
```powershell
Get-WmiObject Win32_LogicalDisk -ComputerName $ComputerName -Filter DriveType=3 | Select-Object DeviceID, @{'Name'='Size (GB)'; 'Expression'={[math]::truncate($_.size / 1GB)}}, @{'Name'='Freespace (GB)'; 'Expression'={[math]::truncate($_.freespace / 1GB)}}
```
<br>
### Remotely Fetch $ComputerName's BIOS Version
```powershell
Get-WmiObject -Class Win32_BIOS -ComputerName $ComputerName
```
## Users
<br>
### Fetch $Username's Group Membership
```powershell
@ -52,16 +82,14 @@ Get-ADPrincipalGroupMembership (Get-ADUser $Username) | select-object name
<br>
### Fetch $ComputerName's Make & Model
```powershell
Get-CimInstance -ComputerName $ComputerName -ClassName Win32_ComputerSystem | Select-Object -Property Manufacturer, Model
```
## Groups
<br>
### Fetch $ComputerName's Serial Number
### Fetch AD Groups with $SearchTerm in them
```powershell
Get-CimInstance -ComputerName $ComputerName -ClassName Win32_bios | Select-Object -Property SerialNumber
```
Get-ADGroup -Filter 'name -like "*$SearchTerm*"' | Sort-Object | select Name
```
<br>