
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2021 03:30 PM
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:
Add Asset Action with the following, amend your path to the script:
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}
Labels:
- Labels:
-
Custom Actions
0 REPLIES 0
