{"id":1194,"date":"2014-01-14T20:08:39","date_gmt":"2014-01-14T19:08:39","guid":{"rendered":"http:\/\/sccmfaq.wordpress.com\/?p=1194"},"modified":"2014-01-14T20:08:39","modified_gmt":"2014-01-14T19:08:39","slug":"sccm-2012-r2-delete-client-operations-status","status":"publish","type":"post","link":"https:\/\/blog.hosebei.ch\/?p=1194","title":{"rendered":"SCCM 2012 R2 &#8211; Delete Client Operations Status"},"content":{"rendered":"<p>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:<br \/>\n<a href=\"http:\/\/hosebei.wordpress.com\/wp-content\/uploads\/2014\/01\/clientoperations01.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/hosebei.wordpress.com\/wp-content\/uploads\/2014\/01\/clientoperations01.png?w=300\" alt=\"Client Operation Overview\" width=\"300\" height=\"113\" class=\"aligncenter size-medium wp-image-1195\" srcset=\"https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2014\/01\/clientoperations01.png 1435w, https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2014\/01\/clientoperations01-300x114.png 300w, https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2014\/01\/clientoperations01-1024x388.png 1024w, https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2014\/01\/clientoperations01-768x291.png 768w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n<!--more--><br \/>\nThe GUI won&#8217;t allow you to delete multiple Operation Status at the same time:<br \/>\n<a href=\"http:\/\/hosebei.wordpress.com\/wp-content\/uploads\/2014\/01\/clientoperations02.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/hosebei.wordpress.com\/wp-content\/uploads\/2014\/01\/clientoperations02.png?w=300\" alt=\"Client Operation Delete GUI\" width=\"300\" height=\"115\" class=\"aligncenter size-medium wp-image-1197\" srcset=\"https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2014\/01\/clientoperations02.png 642w, https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2014\/01\/clientoperations02-300x116.png 300w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nWould you like to delete all of this entries manually? Even if I could charge the hours as a Consultant, no way&#8230;<br \/>\nJust take a look to this powershell line, which deletes <strong>all expired<\/strong> operations:<br \/>\n<code>Foreach($cmcops in Get-CMClientOperations){If ($cmcops.IsExpired -eq 1) {Remove-CMClientOperation -Id $cmcops.ID -Force}}<\/code><br \/>\n<a href=\"http:\/\/hosebei.wordpress.com\/wp-content\/uploads\/2014\/01\/clientoperations03.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/hosebei.wordpress.com\/wp-content\/uploads\/2014\/01\/clientoperations03.png?w=300\" alt=\"Delete ClientOperations PoSh\" width=\"300\" height=\"16\" class=\"aligncenter size-medium wp-image-1202\" srcset=\"https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2014\/01\/clientoperations03.png 1157w, https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2014\/01\/clientoperations03-300x17.png 300w, https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2014\/01\/clientoperations03-1024x58.png 1024w, https:\/\/blog.hosebei.ch\/wp-content\/uploads\/2014\/01\/clientoperations03-768x43.png 768w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nAn easy one-liner, don&#8217;t you think?<\/p>\n<p>Hope this helps \ud83d\ude42<br \/>\nMartin<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,25],"tags":[],"class_list":["post-1194","post","type-post","status-publish","format-standard","hentry","category-general","category-monitoring"],"_links":{"self":[{"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=\/wp\/v2\/posts\/1194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1194"}],"version-history":[{"count":0,"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=\/wp\/v2\/posts\/1194\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hosebei.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}