SCOM2012 powershell Install-SCOMAgent command and RunAs accounts
In the documentation for this command it states:
-AgentActionAccount <PSCredential>
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 re
presents an action account, or type a command that gets the action account. For informati
on about how to get action accounts, type Get-Help Get-SCOMRunAsAccount.
Does this mean that it is in some way possible to through powershell re-use an already specified RunAs-account and its password to pass to this parameter?
If so.. How? I haven't found any more info on this anywhere - does anyone else have any further knowledge on this?
Kind regards / Jon
May 8th, 2012 9:13am
Hi,
Please run get-help get-scomrunasaccount detailed and see if the information is helpful.
Thanks. Nicholas Li
TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
May 10th, 2012 3:15am
Thanks for your reply.
The Install-SCOMAgent cmdlets' parameter -AgentActionAccount wants the passed variable to be in the PSCredential type but the Get-SCOMRunAsAccount cmdlet delivers the result in the type
Microsoft.EnterpriseManagement.Security.ActionAccountSecureData.
Is there a way to convert the results from the Get-SCOMRunAsAccount cmdlet to the PSCredential form so the Install-SCOMAgent cmdlet can use it?
May 10th, 2012 4:01am
Hi,
I noticed the cmdlet Get-Credential can create a PSCredential object. Please see if it helps:
Get-Credential
http://technet.microsoft.com/en-us/library/hh849815.aspx
Thanks. Nicholas Li
TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
May 15th, 2012 3:10am
Hi,
I noticed the cmdlet Get-Credential can create a PSCredential object. Please see if it helps:
Get-Credential
http://technet.microsoft.com/en-us/library/hh849815.aspx
Thanks. Nicholas Li
TechNet Community Support
May 15th, 2012 3:10am
Hi,
The Get-Credential cmdlet can create PSCredentials, but how can this be used to get the credentials from the RunAs-accounts in SCOM as the Install-SCOMAgent cmdlet documentation hints to?
Thanks for the assistance so far.
/ Jon
Free Windows Admin Tool Kit Click here and download it now
May 28th, 2012 7:16am