Freigeben über


Finding Management Packs from Microsoft Download website using PowerShell

I don’t know if you noticed but Daniel Savage started a blog series about how we are raising the bar with respect to Management Packs. Daniel is responsible for all things related to Operations Manager Management Packs including customer satisfaction related to MPs for Microsoft server workloads.

In his first blogpost he also references a Wiki Management Pack page on Microsoft Technet.

So I thought it would be cool to be able to scrape some of the information about Management Packs using PowerShell. With some help from Jeff Wouters it turned out not to be that difficult.

 $hsg = Invoke-WebRequest -Uri "https://social.technet.microsoft.com/wiki/contents/articles/16174.microsoft-management-packs.aspx"
$hsg.Links | Where-Object {($_.href -like "*https://www.microsoft.com/*download*") -and ($_.outerText -notlike "*Link to download page*") -and ($_.InnerHTML -like "*This link*")} | 
Select @{Label="Management Pack";Expression={$_.InnerText}}, @{Label="Download Link";Expression={$_.href}}

image

 [xml]$hsg = Invoke-WebRequest "https://social.technet.microsoft.com/wiki/contents/articles/16174.microsoft-management-packs/rss.aspx"

$hsg.rss.channel.item | select Title, pubDate, creator

image

 

You could use some of the code to create some monitor to check for new Management Pack updates, using the RSS feed or some other fun stuff.

Have fun!

Comments