SCCM 2012 R2 – Delete Client Operations Status

by

·

,

I often hear from customers, that they need a solution to delete expired Client Operations, the console Looks like this, but with more than hundreds of Operations:
Client Operation Overview

The GUI won’t allow you to delete multiple Operation Status at the same time:
Client Operation Delete GUI
Would you like to delete all of this entries manually? Even if I could charge the hours as a Consultant, no way…
Just take a look to this powershell line, which deletes all expired operations:
Foreach($cmcops in Get-CMClientOperations){If ($cmcops.IsExpired -eq 1) {Remove-CMClientOperation -Id $cmcops.ID -Force}}
Delete ClientOperations PoSh
An easy one-liner, don’t you think?

Hope this helps 🙂
Martin

Comments

3 responses to “SCCM 2012 R2 – Delete Client Operations Status”

  1. Martin Avatar

    Anything I need to install first… I get an error when running it

    Get-CMClientOperations : The term ‘Get-CMClientOperations’ is not recognized as the name of a cmdlet, function, script
    file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct a
    nd try again.
    At line:1 char:20

    1. Martin Wüthrich Avatar

      No, not installed. You should only have imported the SCCM Module:
      http://cm12sdk.net/?page_id=1623

  2. […] I have been using the wonderful script from the site http://blog.hosebei.ch/2014/01/14/sccm-2012-r2-delete-client-operations-status/ […]

Leave a Reply

Your email address will not be published. Required fields are marked *