Download All Microsoft Management Packs for SCOM 2007, R2 and 2012 in Bulk V3

In short the script grabs the names and the links for all management packs on the site. Than it goes trough every MP link. From every MP page gets the version of it and all download links (msi, guides and etc.). Authors: Stanislav Zhelyazkov, Damian Flynn and Cameron Fuller

 
 
 
 
 
4.9 Star
(30)
Add to favorites
System Center
6/29/2015
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • 'Bug' in Get-MSDownloadVersionDetails
    1 Posts | Last post November 17, 2017
    • The code should be changed to:
                  if ($HTTPData -match 'Version:[ ]{1,}</div><p>(.+?)</p></div>') 
                  { 
                      $MPVersion=$matches[1].Replace("?","").Trimend() 
                  } 
       
       
                  if ($HTTPData -match 'Date Published:[ ]{1,}</div><p>(.+?)</p></div>') 
                  { 
                      $MPPublishDate=$matches[1].Replace("/","-").Trimend() 
                  } 
      
      without this change the 'Version' and 'Date Published'will not be extracted anymore
  • Great script
    1 Posts | Last post June 25, 2015
  • Error "This operation is not supported for a relative URI"
    3 Posts | Last post February 23, 2015
    • Great script! But unfortunately I get the following error message:
      
      
      Invoke-WebRequest : This operation is not supported for a relative URI.
      At C:\temp\Get-All-SCOM-MPs-V3.0.1.ps1:299 char:23
      +         $allmpspage = Invoke-WebRequest -Uri "http://social.technet.microsoft.co ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (:) [Invoke-WebRequest], InvalidOperationException
          + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
      
      
      [We have a proxy server that requires authentication. So I added 
       -Proxy "proxy address" -ProxyCredential "my username" to the Invoke-WebRequest line. I hope this is correct?!?]
      
    • Hi
      Currently the script does not support defining proxy. I will consider this suggestion and will see if we can implement it.
    • The script is currently using the inbox Invoke-WebRequest command to do most of the heavy lifting, so if you need a proxy server, maybe adding something like this to your profile would help
      
      replace myProxyName with the name of your proxy server, and the script should update the global variable for the session to indicate that you wish to use your proxy sever to get out.
      
      if(Test-Connection myProxyName -Count 1 -Quiet)
      {
          $global:PSDefaultParameterValues = @{
              'Invoke-RestMethod:Proxy'='http://myProxyName:8080'
              'Invoke-WebRequest:Proxy'='http://myProxyName:8080'
              '*:ProxyUseDefaultCredentials'=$true
          }
      }
  • v3.0
    2 Posts | Last post February 15, 2015
    • Thanks for the update, Stanislav (and @Damain_Flynn)! I like the new features and the transformation into functions; this makes the script much easier to use within automation (like you were suggesting...I am looking forward to seeing what you have in mind for that).
      
      I did notice that, as written currently, the Write-CMTraceLog function ignores any non-default output directories entered into the Get-SCOMManagementPacks function. I went ahead and fixed that, as well as made a few other small tweaks, and have the updated file available on my OneDrive, which you are free to review and keep any changes you like: 
      
      http://1drv.ms/1wybU6U
      
      Thanks again!
    • Hi Gabriel,
      I think we fixed this in the latest version 3.0.1.
  • Possible future enhancements ?
    3 Posts | Last post February 15, 2015
    • Hi,
        Thanks for the great script - very useful.
      
      I'm not sure if others would find these suggestions helpful - but it think they might be worth considering for future versions.
      
      1) Option to copy all the extracted *.mp files to a central directory - to allow for quicker importing.
      2) As an extension to the above, option to exclude certain language specific mp's. e.g. Microsoft.Windows.DHCPServer.Library.HUN.mp or to only include English mps, or French mp's etc.
    • I should point out that I am currently using this line of powershell to achieve it... however I am well aware that my powershell is terrible... but it may be a stopgap if someone else has the same requirement.
      
      get-childitem c:\mps\microsoft -filter *.mp -exclude *CHS.mp,*CHT.mp,*CSY.mp,*DEU.mp,*ESN.mp,*FRA.mp,*HUN.mp,*ITA.mp,*JPN.mp,*KOR.mp,*NLD.mp,*PLK.mp,*PTB.mp,*PTG.mp,*RUS.mp,*SVE.mp,*TRK.mp -recurse | copy-item -Destination C:\mps\MasterExtract
    • Hi
      Cameron wrote something that might fit your needs I think:
      http://blogs.catapultsystems.com/cfuller/archive/2014/12/01/powershell-synchronization-for-management-packs-between-management-groups-scom-sysctr-powershell.aspx
  • Wildcard error
    2 Posts | Last post February 15, 2015
    • Attempting to run this in a SCOM 2012 R2 RU3 but get prompted to add missing wildcard. Any way around this without making changes to enhanced security on the server?
      
      tia
    • Hi Phil,
      The script does not have dependency on SCOM version. You can run it on any server with PowerShell 4.0 (this is the version we have tested it.) and direct Internet connection. I do not understand what the script prompts you for. May be if you give us more detailed information what are you doing and what you see will give us clue. Screenshots are always welcome.
  • Cookie Prompt using 2.4?
    6 Posts | Last post June 08, 2014
    • Anyone else getting a Windows Security Warning on v2.4?
      
      Prompts regarding adding a cookie to your machine
    • Yep. Something changed on the MS side last month. The way this parses the html is causing the popup to accept a cookie. Reworking the parser queries to eliminate that from happening  Unless Stanislav gets to it sooner. :)
    • Thank you guys for notifying me about this. I will try to find workaround for this.
    • Couple problems. The first is a known problem with invoke-webrequest and parsedhtml.  If the site that you are parsing has cookies other than session cookies powershell will prompt to accept/deny the cookie.  usually this just affects scripts that are being run in PSE but it seems to affect powershell.exe as well now.  The only option I've ever had success with is using basicparsing instead but that requires the scraping method to be alot more complicated.  
      
      Second issue is looks like some of MS download links have changed formats again.  The tags aren't the same anymore so things are breaking down determining version, date, etc.
      
      Third issue is related to the second.  Getting duplicate download links for some MPs.  
      
      I've got the second and third items resolved but need to look into the download links that still don't parse because of the content changes. Also the basic parsing is a major pain....  I'm actually hopeful it might a bug in a recent IE/Windows patch that came out in the past few months as I've only seen this happen in ise, never in commandline powershell.
      
    • So I guess it's stopped working now...??
      
      Out-File : The device is not ready.
      At E:\Get-All-SCOM-MPs-V2.5.ps1:202 char:26
      + "Failure,$Date,$mpname" |Out-File "$dirmp\$MPErrorLogfile" -Append
      +                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : OpenError: (:) [Out-File], IOException
          + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand
       
      MP Name: System Center Global Service Monitor 
      MP Link: http://www.microsoft.com/en-us/download/details.aspx?id=36422
      Confirmation Link: http://www.microsoft.com/en-us/download/confirmation.aspx?id=36422
      MP Version: 1.0.1800.1
      MP Release Date: 1-28-2013
      Download Links:
      http://download.microsoft.com/download/E/C/4/EC4FF131-159F-4135-9A1D-21326A4A3EE2/System Global Service Monitor.msi
      Downloading - System Global Service Monitor.msi ...
      Cannot Invoke MP System Center Global Service Monitor Web page
      
      
    • Hi Kelvin,
      Just checked and the latest version is working for me. I guess the issue is related to something local on the server you are running the script.
  • Great Work
    2 Posts | Last post February 22, 2014
    • Thank so much for this great tool Stanislav. It works like a charm.
    • Thanks Hector
  • updating of management packs
    2 Posts | Last post January 30, 2014
    • I'm new to SCOM and creating of management packs, and this question is not exactly about your script (which just finished its job for me). Does Microsoft every update a previously published management pack, and when they do, does this script find and pull down the update without running through the whole list again?
    • We update management pack versions in this Wiki here: social.technet.microsoft.com/wiki/contents/articles/16174.microsoft-management-packs.aspx
      and the script grabs the latest version from that wiki. The script will run trough the whole script but will download only those MPs that are not in the folder structure that is created during download. This means that if you run the script and download MPs and after that a new version of MP is published and run the script again will be downloaded only the new version.
  • Management Pack Localisation
    3 Posts | Last post December 12, 2013
    • Hi Stanislav
      
      I wan't to now if it's possible to download localized management pack for French language with your script.
      
      Thanks for your work
      
      Best Regards
      
      Frederic
    • Hi Fred,
      It is possible but won't be easy to achieve as I get the download links from this page:
      http://social.technet.microsoft.com/wiki/contents/articles/16174.microsoft-management-packs.aspx
      which points to the English ones. I can try to convert the download links in the script from the English one to French ones but not all MPs have French language and most will fail. Another option would be you to create your own list may be in a file and modify the script to read from that file. Last option would be to create the same Wiki page but only for the French versions of the MPs. In this case you have to maintain that page so you can have new MPs added when they are released.
    • Hi Stan
      
      Maybe I will try with the option to read a file with the list ok french MP
      
      Thanks a lot for your answer
      
                   Fred
1 - 10 of 19 Items