I have one PowerShell script which creates simple Run As Account.
Script is as follows
Import-Module OperationsManager
$sSecureString = ConvertTo-SecureString "password" -AsPlainText -Force
$sCredentials = New-Object System.Management.Automation.PSCredential ("username", $sSecureString)
Add-SCOMRunAsAccount -Simple -Name "run_as_account_name" -Description "run_as_account_description" -RunAsCredential $sCredentials
Whenever username is say "username", run as account is created without no problem.
But whenever username is "username@domainname" or "domainname\username", run as account is created but domainname is removed from account name field.
I am not able to understand why "domainname" is removed.
This is creating problem to my integration.
Thanks,
Mukul