SCOM2012 Powershell Install-SCOMAgent command problem
I have a problem with the SCOM2012 powershell Install-SCOMAgent command.. When I run the command as below it works as expected: Install-SCOMAgent -Name $ToBeInstalled PrimaryManagementServer $ManagementServer It installs the agent on the local system account using my own credentials.. So far so good.. But.. if I run the following commands it doesn't work - the installation hangs/fails: Install-SCOMAgent -Name $ToBeInstalled PrimaryManagementServer $ManagementServer -AgentActionAccount $AAAccountPScredentials According to the documentation it should install the agent using the management servers action account which differs from the agent action account. But.. When I look at the task created, the task has the agent action account as its RunAs account (not the management servers as in the documentation) and I have an event in the event-log that it tries to install from the management server with the agent action account.. When I also add the following switch to the command it works just the same way: Install-SCOMAgent -Name $ToBeInstalled PrimaryManagementServer $ManagementServer -ActionAccount $actionaccountpscredentials -AgentActionAccount $AAAccountPScredentials Has anyone else seen this? Is this a bug?? Has anyone got this working?
May 8th, 2012 9:09am

After further digging the problem remains the same but I have some more info.. To troubleshoot further I tested to add the agent action account specified to the SCOM Administrators role and local admins on the SCOM server - then the agent installs. However, it installs and reports back in SCOM that its Action Account is the System account..?! If I install the agent via the console using a standard discovery with both the MS Action Account and my own credentials, specifying a dedicated agent account it works as expected - the agent installs and reports that it runs with the agentaccount. I have tried the following combinations using the Install-SCOMAgent to achieve the same result but with no luck: Logged on with the agent account to run the command, used the agent account as AgentActionAccount - Runs as SystemLogged on with the agent account to run the command, used the agent account as AgentActionAccount AND as the ActionAccount - Runs as SystemLogged on with my own account to run the command, used the agent account as AgentActionAccount AND as the ActionAccount - Runs as SystemLogged on with the MS action account to run the command, used the agent account as AgentActionAccount AND as the ActionAccount - Runs as SystemLogged on with my own account to run the command, used the agent account as AgentActionAccount and the MSActionAccount as ActionAccount - Runs as SystemLogged on with the MS action account to run the command, used the agent account as AgentActionAccount and the MSActionAccount as ActionAccount - Runs as SystemI have also tried the command with requesting the credentials at the time the command runs but with the same result. Install-SCOMAgent -Name $ToBeInstalled PrimaryManagementServer $ManagementServer -AgentActionAccount (get-credential) Please assist me, I'm going nuts.. Does this cmdlet work as intended for anyone?
Free Windows Admin Tool Kit Click here and download it now
May 9th, 2012 5:26am

Hi, Please check the parameters usage referring to the following document: Install-SCOMAgent http://technet.microsoft.com/en-us/library/hh920243.aspx For the parameter AgentActionAccount, we can see Specifies the action account that the agent will use after it is installed on a computer. If this parameter is omitted, the Local System account is used. Enter a variable that represents an action account, or type a command that gets the action account. For information about how to get action accounts, type Get-Help Get-SCOMRunAsAccount. Meanwhile, I just noticed the following thread which seems similar to the issue, please also check it: SCOM Agent Local System account http://social.technet.microsoft.com/Forums/en-US/operationsmanagerdeployment/thread/feade48a-ed5d-4d21-bbba-afffbc1aabdc Hope this helps. Thanks. Nicholas Li TechNet Community Support
May 10th, 2012 3:01am

Hi, I have read the documentation and practically mimiced the example in the documentation with the testing in my previous post but with the same results: PS C:\>$Agents = "computername" PS C:\>$InstallAccount = Get-Credential PS C:\>$AgentActionAccount = Get-Credential PS C:\>$PrimaryMgmtServer = Get-SCOMManagementserver -Name "scommsserver" PS C:\>$Install-SCOMAgent -Name $Agents -PrimaryManagementServer $PrimaryMgmtServer -ActionAccount $InstallAccount -AgentActionAccount $AgentActionAccount This doesn't work for me. The agent installs but the instance reports to SCOM that it runs as System, not like the other agents in the same list (installed via the console) that reports that they run as the agent action account. That's why I'm very curious to know whether anyone has got this working.
Free Windows Admin Tool Kit Click here and download it now
May 10th, 2012 4:11am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics