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