Installing System Center 2012 Operations Manager agents via PowerShell DSC

If you have a list of servers you need to quickly install an Operations Manager agent, and you do not have access to the SCOM Console, you can always use PowerShell 4 Desired State Configuration (DSC) to do it… Copy the agent files from your Operations Manager installation to a network share. This is a lab environment, so using the domain controller is a bad example…

$FileShr = “\\DC01\Data\Files”

Configuration SCOMAgent {


        Package SCOMAgentPackage {
            Ensure = “Present”
            Name = “System Center 2012 – Operations Manager Agent”
            Path = “$FileShr\Agent\AMD64\MOMAgent.msi”
            productId = “8B21425D-02F3-4B80-88CE-8F79B320D330”
            LogPath = “C:\Files\SCOMAgentInstallLog.txt”



## Compile MOFs and Run ##
SCOMAgent -OutputPath $Pwd\SCOMAgent
Start-DscConfiguration -Path $Pwd\SCOMAgent -Wait -Force -Verbose -ErrorAction Continue

10 thoughts on “Installing System Center 2012 Operations Manager agents via PowerShell DSC

  1. Wilson W.

    How far back does Powershell v4 compatibility go? Will older OS’s like Windows 2003 Server run it? Using DSC is a nice feature only as long as you have standardized on Powershell v4 across all of your systems. I would imagine that in most enterprise environments there would be quite a few systems around that would need to be updated before being able to leverage DSC.

  2. Joe Thompson Post author

    Wilson, for the Preview version of Windows Management Framework 4, which includes PowerShell 4 and DSC, it is supported on Windows 7 SP1 and Windows Server 2008 R2 SP1 and above. I do not know if the they plan to go any further back than that with the release version.

  3. Wilson W.

    Yeah, the challenge for me is that in my company we still have a great number of Windows2003 systems still around, so at best we would only be able to standardize on Powershell v3.


    Right now Im trying to prep my environment for an upgrade to SCOM2012 R2 and the new MMA agent requires Powershell v2 be installed.  We have a lot of systems that only have Powershell v1 installed.



  4. Bad Kitty

    I cannot find an article on the MS site that tells us where to download PowerShell 4 to install on legacy servers. Is it only Windows 8.1 and Server 2012 R2?

    This looks like a great thing to start using now, but we can definitely only use this for new servers.

  5. Wilson W.

    Some important caveats about WMF4.0:


    Supported Operating System
    Windows 7, Windows Embedded Standard 7, Windows Server 2008 R2, Windows Server 2012
    WMF 4.0 requires Microsoft .NET Framework 4.5.

     You can install Microsoft .NET Framework 4.5 from the

    Microsoft Download Center


     Before you install WMF 4.0, be sure to read the WMF 4.0 Release Notes, and read about known incompatibilities with the following Microsoft server-class applications.

    System Center 2012 Configuration Manager (not including SP1)
    System Center Virtual Machine Manager 2008 R2 (including SP1)
    Microsoft Exchange Server 2013, Microsoft Exchange Server 2010, and Microsoft Exchange Server 2007
    Microsoft SharePoint Server 2013 and Microsoft SharePoint Server 2010
    Windows Small Business Server 2011 Standard



    I guess we’ll have to wait for the R2 versions of SCCM, SCVMM, Sharepoint and Exchange before they support WMF4.0……



  6. Tommy Gunn

    Joe, if I install my SCOM agents with PowerShell DSC as described in your posts, are they remotely manageable and updateable, or treated as manually installed agents?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.