SCOM Agent Installation and Reporting Script

This script is best run as a scheduled job where you have access to the SCOM SnapIn. The script will query Active Directory for all servers in the domain and compare that collection with the servers that have the SCOM Agent installed. Those servers that do not have the agent inst

5 Star
3,701 times
Add to favorites
System Center
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Can this script be updated for SCOM 2012
    5 Posts | Last post May 11, 2015
    • Can this script be updated SCOM2012?
      'New-WindowsDis​coveryConfigura​tion' is not recognized.
    • Not yet, but I have plans in place to update this for SCOM 2012 in the near future.
    • I finally have access to SCOM 2012 and was able to use New-WindowsDis​coveryConfigura​tion without any issues with the script. This is from the SCOM Snaping V1 that was loaded along with the operations console. 
      What do you see when you run the following: 
      Get-Command -Module Microsoft.EnterpriseManagement.OperationasManager.Client -Verb New
    • When I run that cmdlet, I don't see the 'new-windowsdiscoveryconfiguration'. Also I don't see the referenced cmdlet on the TechNet page for 2012 SP1
      or 2012 R2
    • there is an error on the script on line 91
      change the value $NonSCOM to $NonSCOMTEMP which is being refrenced from line 85
  • Can this script be updated for SCOM 2012
    3 Posts | Last post December 02, 2013
    • I have most of the cmdlets converted to 2012, but I am having trouble with the discovery part
      $Discover = New-WindowsDiscoveryConfiguration -ComputerName $NonSCOM -PerformVerification -ComputerType "Server"
      $Discover.ComputerNameDiscoveryCriteria.getComputernames() | ForEach {Write-Verbose ("{0}: Attempting to discover" -f $_)}
      Write-Verbose ("[{0}] Beginning SCOM discovery" -f (Get-Date))
      $DiscResults = Start-Discovery -WindowsDiscoveryConfiguration $Discover -ManagementServer $MgmtServer
      The term 'New-WindowsDiscoveryConfiguration' is not recognized as the name of a cmdlet,
      Thanks in advance!!
    • Hi mhanlon. Unfortuantly, I do not have access to SCOM 2012 at this time to verify what the correct cmdlet is, so I am not able to help you at this time. Once I have access, I will update the script for SCOM 2012.
    • Please see my response to the question from new2scom. I am not seeing this issue with SCOM 2012 SP1 and its snapin. Can you provide more information as to what commands you have available?
  • Does this method replicate a 'Push' install
    2 Posts | Last post December 02, 2013
    • Hi, I'm looking to automate scom agent install so that the new agents are treated as having been 'Push' installed (and can therefor be managed via the console for subsequent updates/patches etc) rather than just doing a camman line agent install which means new updates need mannually appled.  So does this script replicate what the console does when doing agent install via discovery Wizard?  Thanks - PS If so would be great if it could be updated to 2012 SP1 as thats where I'm gonna try use the automation. Cheers!!
    • Yes, this should work in the same way as when you use the console to push agents out to a system. I ran this in SCOM 2012 SP1 and didn't see anything that needed to be changed.