This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Debug function will print out the contents of the function if successful | |
#Get-Content Function:\Get-CountPendingUpdates |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-WIAStatusValue($value){ | |
switch -exact ($value) { | |
0 {"NotStarted"} | |
1 {"InProgress"} | |
2 {"Succeeded"} | |
3 {"SucceededWithErrors"} | |
4 {"Failed"} | |
5 {"Aborted"} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
Install all updates on a remote machine. A test script for PSWindowsUpdate | |
.DESCRIPTION | |
Uses the Invoke-WUInstall to remotely execute a Scheduled Task on a target machine. | |
Then executes Get-WUInstall to install all available updates and reboot if necessary. | |
.NOTES | |
Author: TDT | |
#> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
Uninstall a hotfix patch update from a target computer. Requires the HotfixID | |
.DESCRIPTION | |
Uninstall a hotfix patch update from a target computer. | |
Requires the HotfixID (-HotfixID) | |
.EXAMPLE | |
Uninstall-HotFix -ComputerName PC1 -HotfixID KB123456 | |
.SOURCE | |
http://techibee.com/powershell/powershell-uninstall-windows-hotfixesupdates/1084 |