diff --git a/ps-commands.md b/ps-commands.md index fd8061b..36cd3b1 100644 --- a/ps-commands.md +++ b/ps-commands.md @@ -5,7 +5,13 @@ Note: unless otherwise stated, replace any variable such as `$ComputerName` with ### Remotely Fetch a (Partial) Installed Program List for $ComputerName ```powershell -Get-WmiObject win32_product -ComputerName $ComputerName | select Name, version +Get-WmiObject win32_product -ComputerName $ComputerName | Sort-Object | select Vendor, Name, version +``` + +### Remotely Fetch Installed Programs with $SearchTerm in them from $ComputerName + +```powershell +Get-WmiObject win32_product -ComputerName $ComputerName | Where-Object {$_.$Column -like “*$SearchTerm*”} | Sort-Object | select Vendor, Name, version ```