Compare commits
No commits in common. "3368a8651d2dbd07d8c58f472e6c8bc89da7a1fc" and "fd0c66c0d51f140afd9a0052d45f1e0ab04ae842" have entirely different histories.
3368a8651d
...
fd0c66c0d5
1 changed files with 16 additions and 44 deletions
|
@ -4,10 +4,6 @@ Note: unless otherwise stated, replace any variable such as `$ComputerName` with
|
|||
|
||||
<br>
|
||||
|
||||
## Computers
|
||||
|
||||
<br>
|
||||
|
||||
### Remotely Fetch a (Partial) Installed Program List for $ComputerName
|
||||
|
||||
```powershell
|
||||
|
@ -24,6 +20,14 @@ 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
|
||||
|
@ -40,40 +44,6 @@ 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
|
||||
|
@ -82,14 +52,16 @@ Get-ADPrincipalGroupMembership (Get-ADUser $Username) | select-object name
|
|||
|
||||
<br>
|
||||
|
||||
## Groups
|
||||
|
||||
<br>
|
||||
|
||||
### Fetch AD Groups with $SearchTerm in them
|
||||
### Fetch $ComputerName's Make & Model
|
||||
|
||||
```powershell
|
||||
Get-ADGroup -Filter 'name -like "*$SearchTerm*"' | Sort-Object | select Name
|
||||
Get-CimInstance -ComputerName $ComputerName -ClassName Win32_ComputerSystem | Select-Object -Property Manufacturer, Model
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### Fetch $ComputerName's Serial Number
|
||||
|
||||
```powershell
|
||||
Get-CimInstance -ComputerName $ComputerName -ClassName Win32_bios | Select-Object -Property SerialNumber
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue