Click on Pictures to View

To view a larger version of an image within a post, just click on the picture you want to view :)

Wednesday, October 18, 2017

Remove Expired Client Operations - SCCM Admin Console

POWERSHELL - Remove Expired Client Operations in SCCM Admin Console


​​1) Launch Configuration Manager Admin Console
2) File -> Connect via Windows Powershell
SCCM_GUI

3) Copy and paste below code:

Foreach($CMOperation in Get-CMClientOperation)
{
    If ($CMOperation.IsExpired -eq 1) 
    {
        Remove-CMClientOperation -Id $CMOperation.ID -Force
    }
}


4) After script finishes running, verify Client Operations count = 0:

Get-CMClientOperation | measure

5) Confirm in Configuration Manager Console the Client Operations items = 0





**For a progress display, instead use below code:

Foreach($CMOperation in Get-CMClientOperation)
{
    If ($CMOperation.IsExpired -eq 1) 
    {
$CMOperation.ID
        Remove-CMClientOperation -Id $CMOperation.ID -Force
​ }
}






No comments:

Post a Comment

Give my post a +1 or let me know if you found any of my blog content helpful!