Answered by:
SCOM 2012 RC: How do I install the agent on computer(s) in domain using powershell cmdlet

Question
-
Hi,
I have loaded the PSSnapin Microsoft.EnterpriseManagement.OperationsManager.Client on my scom server which provides me with all the cmdlets needed to handle the its operations. There is a cmdlet to install agents named Install-AgentByName which has the parameters -Name (FQDN of the computer where I want to install the agent) -Path (I do not get what value should I pass here), in case i do not what to go with this (-Path) parameter I should pass the -ManagementServer object (can get it by using cmdlet Get-ManagementServer) which in turns request for the -Path parameter to be supplied.
I have a requirement in which I have to manage this agent installation remotely. So I am thinking of doing this by entering into the remote pssession and executing Install-AgentByName cmdlet on scom server.
Can anyone out there help me out in getting me through this path trouble.
Thanks
-Noor
Wednesday, June 6, 2012 9:32 AM
Answers
-
1. $PrimaryMgmtServer = Get-SCOMManagementServer -Name "omvnextqa03.qa.net"
2. Install-SCOMAgent -Name "Mdbqa01.qa.net" -PrimaryManagementServer $PrimaryMgmtServer
where "Mdbqa01.qa.net" is fqdn name of server
For detail, pls. refer to the following document
http://om2012.wordpress.com/2011/12/07/om12-rc-deploying-agents-with-powershell/
Roger
Wednesday, June 6, 2012 4:31 PM
All replies
-
1. $PrimaryMgmtServer = Get-SCOMManagementServer -Name "omvnextqa03.qa.net"
2. Install-SCOMAgent -Name "Mdbqa01.qa.net" -PrimaryManagementServer $PrimaryMgmtServer
where "Mdbqa01.qa.net" is fqdn name of server
For detail, pls. refer to the following document
http://om2012.wordpress.com/2011/12/07/om12-rc-deploying-agents-with-powershell/
Roger
Wednesday, June 6, 2012 4:31 PM -
Hi hopeless guy,
Thanks for the assistance and sparing your valuable time for this.
Actually scom2012RC also gives 2007 powershell cmdlets support in order to avoid any breaches, which I didn't know untill now.
And I was trying to get 2012 cmdlets by adding the pssnapin where the snapin is of 2007. Later I ivoked Import-Module OperationsManager which has got me through this.
Thanks
-Noor
- Proposed as answer by SyedHaroon Thursday, March 14, 2013 9:05 AM
Monday, June 11, 2012 11:06 AM