Invoke-WsusServerCleanup

Si applica a: Windows 10, Windows Server Technical Preview

Invoke-WsusServerCleanup

Performs the process of cleanup on a WSUS server.

Sintassi

Parameter Set: Default
Invoke-WsusServerCleanup [-CleanupObsoleteComputers] [-CleanupObsoleteUpdates] [-CleanupUnneededContentFiles] [-CompressUpdates] [-DeclineExpiredUpdates] [-DeclineSupersededUpdates] [-InformationAction <System.Management.Automation.ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String> ] [-UpdateServer <IUpdateServer> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descrizione dettagliata

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.

Parametri

-CleanupObsoleteComputers

Specifies that the cmdlet deletes obsolete computers from the database.

Alias

none

Obbligatorio?

false

Posizione?

named

Valore predefinito

none

Accettare l'input della pipeline?

false

Accetta caratteri jolly?

false

-CleanupObsoleteUpdates

Specifies that the cmdlet deletes obsolete updates from the database.

Alias

none

Obbligatorio?

false

Posizione?

named

Valore predefinito

none

Accettare l'input della pipeline?

false

Accetta caratteri jolly?

false

-CleanupUnneededContentFiles

Specifies that the cmdlet deletes unneeded update files.

Alias

none

Obbligatorio?

false

Posizione?

named

Valore predefinito

none

Accettare l'input della pipeline?

false

Accetta caratteri jolly?

false

-CompressUpdates

Specifies that the cmdlet deletes obsolete revisions to updates from the database.

Alias

none

Obbligatorio?

false

Posizione?

named

Valore predefinito

none

Accettare l'input della pipeline?

false

Accetta caratteri jolly?

false

-DeclineExpiredUpdates

Specifies that the cmdlet declines expired updates.

Alias

none

Obbligatorio?

false

Posizione?

named

Valore predefinito

none

Accettare l'input della pipeline?

false

Accetta caratteri jolly?

false

-DeclineSupersededUpdates

Specifies that the cmdlet declines superseded updates.

Alias

none

Obbligatorio?

false

Posizione?

named

Valore predefinito

none

Accettare l'input della pipeline?

false

Accetta caratteri jolly?

false

-InformationAction<System.Management.Automation.ActionPreference>

Specifies how this cmdlet responds to an information event. I valori accettabili per questo parametro sono: 

-- Continue
-- Ignore
-- Inquire
-- SilentlyContinue
-- Stop
-- Suspend

Alias

infa

Obbligatorio?

false

Posizione?

named

Valore predefinito

none

Accettare l'input della pipeline?

false

Accetta caratteri jolly?

false

-InformationVariable<System.String>

Specifies an information variable.

Alias

iv

Obbligatorio?

false

Posizione?

named

Valore predefinito

none

Accettare l'input della pipeline?

false

Accetta caratteri jolly?

false

-UpdateServer<IUpdateServer>

Specifies the object that contains the WSUS server. This value is obtained by calling the Get-WsusServer cmdlet and passing the resulting IUpdateServer object into this cmdlet.

Alias

none

Obbligatorio?

false

Posizione?

named

Valore predefinito

none

Accettare l'input della pipeline?

true (ByValue)

Accetta caratteri jolly?

false

-Confirm

Richiede una conferma prima dell'esecuzione del cmdlet.

Obbligatorio?

false

Posizione?

named

Valore predefinito

false

Accettare l'input della pipeline?

false

Accetta caratteri jolly?

false

-WhatIf

Mostra che cosa succede se viene eseguito il cmdlet. Il cmdlet non viene eseguito.

Obbligatorio?

false

Posizione?

named

Valore predefinito

false

Accettare l'input della pipeline?

false

Accetta caratteri jolly?

false

<CommonParameters>

Questo cmdlet supporta i parametri comuni: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer e -OutVariable. Per altre informazioni, vedere  about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Input

Il tipo di input è il tipo di oggetti che è possibile inviare al cmdlet.

  • Microsoft.UpdateServices.Commands.IUpdateServer

Output

Il tipo di output corrisponde al tipo di oggetti emesso dal cmdlet.

  • None

Esempi

Example 1: Run cleanup for obsolete computers

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

PS C:\> Get-WsusServer | Invoke-WsusServerCleanup -CleanupObsoleteComputers

Example 2: Run cleanup for obsolete computers and updates

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

PS C:\> Get-WsusServer consoso | Invoke-WsusServerCleanup -CleanupObsoleteComputers -CleanupObsoleteUpdates

Argomenti correlati

Get-WsusServer