PSSysadminToolkit
PSSysadminToolkit copied to clipboard
Add Install-PendingUpdates.ps1
All pending updates for servers are install. -reboot as an option too. Accepts string of server names or collection of ADcomputer objects.
Idea credit: Reddit user /u/FireLucid
To add a bit more detail.
Maybe also have a Get-PendingUpdates to see what servers have WSUS pending updates and an install-PendingUpdates to install them. A reboot switch would be great as well.
don't forget the SCCM people:
get-wmiobject -query "SELECT * FROM CCM_SoftwareUpdate" -namespace "ROOT\ccm\ClientSDK" -ComputerName $ComputerName
Members:
Name MemberType Definition
---- ---------- ----------
PSComputerName AliasProperty PSComputerName = __SERVER
ArticleID Property string ArticleID {get;set;}
BulletinID Property string BulletinID {get;set;}
ComplianceState Property uint32 ComplianceState {get;set;}
ContentSize Property uint32 ContentSize {get;set;}
Deadline Property string Deadline {get;set;}
Description Property string Description {get;set;}
ErrorCode Property uint32 ErrorCode {get;set;}
EstimatedInstallTime Property uint32 EstimatedInstallTime {get;set;}
EvaluationState Property uint32 EvaluationState {get;set;}
ExclusiveUpdate Property bool ExclusiveUpdate {get;set;}
FullName Property string FullName {get;set;}
IsO365Update Property bool IsO365Update {get;set;}
IsUpgrade Property bool IsUpgrade {get;set;}
MaxExecutionTime Property uint32 MaxExecutionTime {get;set;}
Name Property string Name {get;set;}
NextUserScheduledTime Property string NextUserScheduledTime {get;set;}
NotifyUser Property bool NotifyUser {get;set;}
OverrideServiceWindows Property bool OverrideServiceWindows {get;set;}
PercentComplete Property uint32 PercentComplete {get;set;}
Publisher Property string Publisher {get;set;}
RebootOutsideServiceWindows Property bool RebootOutsideServiceWindows {get;set;}
RestartDeadline Property string RestartDeadline {get;set;}
StartTime Property string StartTime {get;set;}
Type Property uint32 Type {get;set;}
UpdateID Property string UpdateID {get;set;}
URL Property string URL {get;set;}
UserUIExperience Property bool UserUIExperience {get;set;}
__CLASS Property string __CLASS {get;set;}
__DERIVATION Property string[] __DERIVATION {get;set;}
__DYNASTY Property string __DYNASTY {get;set;}
__GENUS Property int __GENUS {get;set;}
__NAMESPACE Property string __NAMESPACE {get;set;}
__PATH Property string __PATH {get;set;}
__PROPERTY_COUNT Property int __PROPERTY_COUNT {get;set;}
__RELPATH Property string __RELPATH {get;set;}
__SERVER Property string __SERVER {get;set;}
__SUPERCLASS Property string __SUPERCLASS {get;set;}
ConvertFromDateTime ScriptMethod System.Object ConvertFromDateTime();
ConvertToDateTime ScriptMethod System.Object ConvertToDateTime();