Tag Archives: wsus

Delete declined updates in WSUS

We have all seen poorly maintained WSUS servers.  This script can assist by deleting declined updates.  Combine this with a number of other methods of housekeeping on WSUS servers.

Additionally using the script we can see all the objects returned by the command $wsus.getupdates() | get-member | select name

Name
----
AcceptLicenseAgreement
Approve
ApproveForOptionalInstall
CancelDownload
CreateObjRef
Decline
Equals
ExpirePackage
ExportPackageMetadata
GetChangesFromPreviousRevision
GetHashCode
GetInstallableItems
GetLicenseAgreement
GetLifetimeService
GetRelatedUpdates
GetSummary
GetSummaryForComputerTargetGroup
GetSummaryPerComputerTargetGroup
GetSupportedUpdateLanguages
GetType
GetUpdateApprovals
GetUpdateCategories
GetUpdateClassification
GetUpdateEventHistory
GetUpdateInstallationInfoPerComputerTarget
InitializeLifetimeService
PurgeAssociatedReportingEvents
Refresh
RefreshUpdateApprovals
ResumeDownload
ToString
AdditionalInformationUrls
ArrivalDate
CompanyTitles
CreationDate
DefaultPropertiesLanguage
Description
HasEarlierRevision
HasLicenseAgreement
HasStaleUpdateApprovals
HasSupersededUpdates
Id
InstallationBehavior
IsApproved
IsBeta
IsDeclined
IsEditable
IsLatestRevision
IsSuperseded
IsWsusInfrastructureUpdate
KnowledgebaseArticles
LegacyName
MsrcSeverity
ProductFamilyTitles
ProductTitles
PublicationState
ReleaseNotes
RequiresLicenseAgreementAcceptance
SecurityBulletins
Size
State
Title
UninstallationBehavior
UpdateClassificationTitle
UpdateServer
UpdateSource
UpdateType