From f93ffa5c9d467fbc7129b7cf4c5007d76e13d286 Mon Sep 17 00:00:00 2001 From: capntack Date: Mon, 10 Apr 2023 19:15:53 -0500 Subject: [PATCH] Edited and added commands --- ps-commands.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 ```