Separated into Computers/Users/Groups

This commit is contained in:
capntack 2023-07-30 13:57:40 -05:00
commit 3368a8651d

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,15 +40,7 @@ Get-ADPrincipalGroupMembership (Get-ADComputer $ComputerName) | select-object na
<br>
### Fetch $Username's Group Membership
```powershell
Get-ADPrincipalGroupMembership (Get-ADUser $Username) | select-object name
```
<br>
### Fetch $ComputerName's Make & Model
### Remotely Fetch $ComputerName's Make & Model
```powershell
Get-CimInstance -ComputerName $ComputerName -ClassName Win32_ComputerSystem | Select-Object -Property Manufacturer, Model
@ -60,7 +48,7 @@ Get-CimInstance -ComputerName $ComputerName -ClassName Win32_ComputerSystem | Se
<br>
### Fetch $ComputerName's Serial Number
### Remotely Fetch $ComputerName's Serial Number
```powershell
Get-CimInstance -ComputerName $ComputerName -ClassName Win32_bios | Select-Object -Property SerialNumber
@ -80,4 +68,28 @@ Get-WmiObject Win32_LogicalDisk -ComputerName $ComputerName -Filter DriveType=3
```powershell
Get-WmiObject -Class Win32_BIOS -ComputerName $ComputerName
```
```
## Users
<br>
### Fetch $Username's Group Membership
```powershell
Get-ADPrincipalGroupMembership (Get-ADUser $Username) | select-object name
```
<br>
## Groups
<br>
### Fetch AD Groups with $SearchTerm in them
```powershell
Get-ADGroup -Filter 'name -like "*$SearchTerm*"' | Sort-Object | select Name
```
<br>