Separated into Computers/Users/Groups

main
capntack 1 year ago
parent ad2d7d35a5
commit 3368a8651d

@ -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,64 +24,72 @@ Get-WmiObject win32_product -ComputerName $ComputerName | Where-Object {$_.$Colu
<br>
### Fetch AD Groups with $SearchTerm in them
### Remotely Fetch $ComputerName's Boot Time
```powershell
Get-ADGroup -Filter 'name -like "*$SearchTerm*"' | Sort-Object | select Name
Get-CimInstance -ClassName Win32_OperatingSystem -ComputerName $ComputerName | slect csname, lastbootuptime
```
<br>
### Remotely Fetch $ComputerName's Boot Time
### Fetch $ComputerName's Group Membership
```powershell
Get-CimInstance -ClassName Win32_OperatingSystem -ComputerName $ComputerName | slect csname, lastbootuptime
Get-ADPrincipalGroupMembership (Get-ADComputer $ComputerName) | select-object name
```
<br>
### Fetch $ComputerName's Group Membership
### Remotely Fetch $ComputerName's Make & Model
```powershell
Get-ADPrincipalGroupMembership (Get-ADComputer $ComputerName) | select-object name
Get-CimInstance -ComputerName $ComputerName -ClassName Win32_ComputerSystem | Select-Object -Property Manufacturer, Model
```
<br>
### Fetch $Username's Group Membership
### Remotely Fetch $ComputerName's Serial Number
```powershell
Get-ADPrincipalGroupMembership (Get-ADUser $Username) | select-object name
Get-CimInstance -ComputerName $ComputerName -ClassName Win32_bios | Select-Object -Property SerialNumber
```
<br>
### Fetch $ComputerName's Make & Model
### Remotely Fetch $ComputerName's Total/Free Storage
```powershell
Get-CimInstance -ComputerName $ComputerName -ClassName Win32_ComputerSystem | Select-Object -Property Manufacturer, Model
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>
### Fetch $ComputerName's Serial Number
### Remotely Fetch $ComputerName's BIOS Version
```powershell
Get-CimInstance -ComputerName $ComputerName -ClassName Win32_bios | Select-Object -Property SerialNumber
Get-WmiObject -Class Win32_BIOS -ComputerName $ComputerName
```
## Users
<br>
### Remotely Fetch $ComputerName's Total/Free Storage
### Fetch $Username's Group Membership
```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)}}
Get-ADPrincipalGroupMembership (Get-ADUser $Username) | select-object name
```
<br>
### Remotely Fetch $ComputerName's BIOS Version
## Groups
<br>
### Fetch AD Groups with $SearchTerm in them
```powershell
Get-WmiObject -Class Win32_BIOS -ComputerName $ComputerName
Get-ADGroup -Filter 'name -like "*$SearchTerm*"' | Sort-Object | select Name
```
<br>
Loading…
Cancel
Save