A client of mine has a post build server script that they run on every new server. This installs all of the settings
and agents and we were using the invoke-command cmdlet to install the SCOM 2007 R2 agent from the RMS server to the new server. I am trying to replicate the same process using SCOM 2012 but I am unable to remotely run the SCOM 2012 cmdlets.
Try to code some logging into your script so you can see where it's failing. Nothing super, just output the results to a text file. That will track down exactly where its failing. Then come back if you're still stuck.
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.