Notification

Icon
Error

Check Asset Window Update Status Via Powershell - Check Asset Window Update Status Via Powershell

Posted: Tuesday, January 19, 2021 3:30:09 PM(UTC)
Andy.S

Andy.S

Member Original PosterPosts: 57
0
Like
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:

Code:
$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:

Code:

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

Active Discussions

Lansweeper LSAgent Rescan Asset
by  marck1024   Go to last post Go to first unread
Last post: Today at 4:11:53 PM(UTC)
Lansweeper Allowing a role to create asset groups
by  mh6543   Go to last post Go to first unread
Last post: 2/26/2021 10:00:40 PM(UTC)
Lansweeper Export LsAgent Assets
by  steveb  
Go to last post Go to first unread
Last post: 2/26/2021 7:26:32 PM(UTC)
Lansweeper Asset Uptime "Asset on total"
by  Andy.S   Go to last post Go to first unread
Last post: 2/26/2021 3:07:35 PM(UTC)
Lansweeper Scanning for Static Routes?
by  ChrisParr  
Go to last post Go to first unread
Last post: 2/26/2021 12:43:28 PM(UTC)
Lansweeper lansweeperuser sql database permissions
by  David K.   Go to last post Go to first unread
Last post: 2/25/2021 11:54:38 PM(UTC)
Lansweeper Scanning certificates
by  Vincent Pollock  
Go to last post Go to first unread
Last post: 2/25/2021 8:35:11 PM(UTC)