→ The Lansweeper Customer Excellence Awards 2024 - Submit Your Project Now! Learn More & Enter Here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Andy_Sismey
Champion Sweeper III
Powershell example
This is a action script which queries the remote asset and gathers the status of Windows Updates and displays them in Notepad, save the powershell script in your script area within "DefaultPackageShare$"

Powershell Script check-updates.ps1:

$Computername=$args[0]


$query=Get-HotFix -ComputerName $Computername

$query| Export-Csv -NoType "c:\temp\$computername-WindowsUpdates.csv"
$FileLocation="c:\temp\$computername-WindowsUpdates.csv"
Start-Process notepad $FileLocation


Add Asset Action with the following, amend your path to the script:


powershell -noprofile -ExecutionPolicy bypass -command //SERVER/defaultpackageshare$/scripts/check-updates.ps1 {computer}
0 REPLIES 0