{"id":337,"date":"2015-05-18T20:39:34","date_gmt":"2015-05-19T01:39:34","guid":{"rendered":"http:\/\/nukeitmike.com\/blog\/?p=337"},"modified":"2015-05-18T20:39:34","modified_gmt":"2015-05-19T01:39:34","slug":"operations-manager-2012-r2-management-pack-dependencies","status":"publish","type":"post","link":"https:\/\/blog.nukeitmike.com\/index.php\/2015\/05\/18\/operations-manager-2012-r2-management-pack-dependencies\/","title":{"rendered":"Operations Manager 2012 R2 Management Pack Dependencies"},"content":{"rendered":"<p>I am not proficient at managing Ops Manager.\u00a0 I am at best a competent tinkerer.\u00a0 I have been needing to do some clean up on our Ops Manager installation, and clear some management packs that are not used, or just used to generate noise that we subsequently ignore.\u00a0 That is a bit of an annoying task, with trying to trace down all the dependencies.<\/p>\n<p>To make it easier, I looked for\u00a0 a script to log the management pack dependencies, version and ID.\u00a0 I found this post from 2009, but it wasn\u2019t very effective in the current version of Ops Manager. <a href=\"http:\/\/www.systemcentercentral.com\/list-management-packs-dependencies-powershell-script\/\">http:\/\/www.systemcentercentral.com\/list-management-packs-dependencies-powershell-script\/<\/a><\/p>\n<p>So I decided to write a new one.\u00a0 Here is what I came up with:<\/p>\n<blockquote><p>New-SCOMManagementGroupConnection -ComputerName &lt;Your Ops Mgr Server Name&gt;<\/p>\n<p># Create a new Excel object using COM<br \/>\n$Excel = New-Object -ComObject Excel.Application<br \/>\n$Excel.visible = $True<br \/>\n$Excel = $Excel.Workbooks.Add()<br \/>\n$Sheet = $Excel.Worksheets.Item(1)<\/p>\n<p># Counter variable for rows<br \/>\n$intRow = 2<\/p>\n<p>$Sheet.Cells.Item(1,1) = &#8220;Parent&#8221;<br \/>\n$Sheet.Cells.Item(1,2) = &#8220;MP Name&#8221;<br \/>\n$Sheet.Cells.Item(1,3) = &#8220;Version&#8221;<br \/>\n$Sheet.Cells.Item(1,4) = &#8220;ID&#8221;<\/p>\n<p>&nbsp;<\/p>\n<p>$Sheet.Cells.Item(1,1).Font.Bold = $True<br \/>\n$Sheet.Cells.Item(1,2).Font.Bold = $True<br \/>\n$Sheet.Cells.Item(1,3).Font.Bold = $True<br \/>\n$Sheet.Cells.Item(1,4).Font.Bold = $True<br \/>\n$MPCollection = Get-SCManagementPack<br \/>\nforeach ($_ in $MPCollection) {<br \/>\n$intRow++<br \/>\n$MPParent = $_.Name<br \/>\n#\u00a0\u00a0\u00a0\u00a0 Write-Host $MPParent<br \/>\n$Sheet.Cells.Item($intRow,1) = $MPParent<br \/>\n$Sheet.Cells.Item($intRow,2) = &#8220;*************&#8221;<br \/>\n$MPChecking = Get-SCManagementPack -Name $MPParent -recurse<br \/>\nforeach ($_ in $MPChecking){<br \/>\n$intRow++<br \/>\nWrite-Host $intRow<br \/>\n$MPName = $_.Name<br \/>\n#\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Write-Host $MPName<br \/>\n$MPVersion = $_.Version<br \/>\n$MPID = $_.ID<br \/>\n#\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Write-Host $MPID<br \/>\n$Sheet.Cells.Item($intRow,2) = $MPName<br \/>\n$Sheet.Cells.Item($intRow,3) = $MPVersion<br \/>\n$Sheet.Cells.Item($intRow,4) = &#8220;$MPID&#8221;<br \/>\n}<br \/>\n}<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I am not proficient at managing Ops Manager.\u00a0 I am at best a competent tinkerer.\u00a0 I have been needing to do some clean up on our Ops Manager installation, and clear some management packs that are not used, or just used to generate noise that we subsequently ignore.\u00a0 That is a bit of an annoying&hellip; <a class=\"more-link\" href=\"https:\/\/blog.nukeitmike.com\/index.php\/2015\/05\/18\/operations-manager-2012-r2-management-pack-dependencies\/\">Continue reading <span class=\"screen-reader-text\">Operations Manager 2012 R2 Management Pack Dependencies<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[17,24,25,33],"tags":[120,128,135,154,176],"class_list":["post-337","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-scom","category-scripting","category-system-center","tag-microsoft","tag-opsmgr","tag-powershell","tag-scripting","tag-system-center","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pcW544-5r","_links":{"self":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/posts\/337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/comments?post=337"}],"version-history":[{"count":0,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/posts\/337\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/media?parent=337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/categories?post=337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/tags?post=337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}