Description
If one runs the examples PowerShell examples you are prompted for the server port. Please adjust the document and any undocumented command line parameters to provide the server port, See output below. In this example I needed to enter 8530 below to continue the script.
PS C:\Users\User> Get-WsusServer "WSUS" | Invoke-WsusServerCleanup -CleanupObsoleteComputers -CleanupObsoleteUpdates -CleanupUnneededContentFiles -CompressUpdates -DeclineExpiredUpdates -DeclineSupersededUpdates
cmdlet Get-WsusServer at command pipeline position 1
Supply values for the following parameters:
PortNumber: 8530
Obsolete Updates Deleted:0
Expired Updates Declined: 0
Obsolete Updates Deleted:0
Updates Compressed:0
Obsolete Computers Deleted:0
Diskspace Freed:0
PS C:\Users\User> $PSVersionTable
Name Value
PSVersion 5.1.17763.3770
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.3770
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Windows Server 2019 Datacenter
Veriosn 1809
Build 17763.3770
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: bf659891-bcf6-dc90-b424-2d4000615aaa
- Version Independent ID: 6b080124-5e89-69c7-e335-eedd4082c6fd
- Content: Invoke-WsusServerCleanup (UpdateServices)
- Content Source: docset/winserver2022-ps/updateservices/Invoke-WsusServerCleanup.md
- Product: w10
- Technology: windows
- GitHub Login: @JasonGerend
- Microsoft Alias: jgerend