PowerShell Logo Small

Invoke-WsusServerCleanup



This is the built-in help made by Microsoft for the command 'Invoke-WsusServerCleanup', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Performs the process of cleanup on a specified Windows Server Update Services (WSUS) server.

SYNTAX


Invoke-WsusServerCleanup [-CleanupObsoleteComputers] [-CleanupObsoleteUpdates] [-CleanupUnneededContentFiles] [-CompressUpdates] [-DeclineExpiredUpdates]
[-DeclineSupersededUpdates] [-UpdateServer <IUpdateServer>] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Invoke-WsusServerCleanup cmdlet performs the process of cleanup on a specified Windows Server Update Services (WSUS) server. This process has the same impact as running
the Cleanup Wizard from within the WSUS Console application and allows the specification of the same options as parameters.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=789392
Get-WsusServer

REMARKS

<

Examples


EXAMPLE 1

PS C:\> Get-WsusServer | Invoke-WsusServerCleanup -CleanupObsoleteComputers
Obsolete Computers Deleted: 1



This example runs this cmdlet on the local WSUS Server specifying the option to clean up obsolete computers.






EXAMPLE 2

PS C:\> Get-WsusServer consoso | Invoke-WsusServerCleanup -CleanupObsoleteComputers -CleanupObsoleteUpdates
Obsolete Updates Deleted: 62
Obsolete Computers Deleted: 0



This example runs this cmdlet on the server named contoso specifying the options to clean up obsolete computers and obsolete updates.