POWERSHELL - Remove Expired Client Operations in SCCM Admin Console
1) Launch Configuration Manager Admin Console
2) File -> Connect via Windows Powershell
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
**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!