Answered by:
get the "Run As Account" associated with "Run As Profile"

Question
-
How can i get the "Run As Account" associated with "Run As Profile" in SCOM 2012 using PowerShell commands or C#.
Please help.
Thanks,
MukulMonday, July 8, 2013 12:39 PM
Answers
-
something around this?
- Get some RunAsProfile
- Enumerate RunAs accounts associated with the profile
$mg = new-object Microsoft.EnterpriseManagement.ManagementGroup("localhost") $RunAsProfileId = (Get-SCOMRunAsProfile -name Microsoft.SystemCenter.ActionAccount).Id $HSref=$mg.GetMonitoringSecureDataHealthServiceReferenceBySecureReferenceId($RunAsProfileId) $HSref | %{$_.GetMonitoringSecureData().Name}
- Edited by Pavel Dzemyantsau Monday, July 8, 2013 5:27 PM
- Proposed as answer by Bob CornelissenMVP Tuesday, July 9, 2013 9:08 AM
- Marked as answer by Cloud_TS Tuesday, July 16, 2013 7:39 AM
Monday, July 8, 2013 5:26 PM
All replies
-
Hi, Set-SCOMRunAsProfile
http://technet.microsoft.com/en-us/library/hh527818.aspx
Monday, July 8, 2013 1:56 PM -
something around this?
- Get some RunAsProfile
- Enumerate RunAs accounts associated with the profile
$mg = new-object Microsoft.EnterpriseManagement.ManagementGroup("localhost") $RunAsProfileId = (Get-SCOMRunAsProfile -name Microsoft.SystemCenter.ActionAccount).Id $HSref=$mg.GetMonitoringSecureDataHealthServiceReferenceBySecureReferenceId($RunAsProfileId) $HSref | %{$_.GetMonitoringSecureData().Name}
- Edited by Pavel Dzemyantsau Monday, July 8, 2013 5:27 PM
- Proposed as answer by Bob CornelissenMVP Tuesday, July 9, 2013 9:08 AM
- Marked as answer by Cloud_TS Tuesday, July 16, 2013 7:39 AM
Monday, July 8, 2013 5:26 PM -
ManagementGroup.GetMonitoringSecureDataHealthServiceReferenceBySecureReferenceId only works for the Default Action Account Run As Profile. It doe not return anything for a custom Run As Profile. Is this a bug? If yes, how can I file a bug report to Microsoft System Center Operations Manager team?
- Edited by SunnyRon Wednesday, July 15, 2015 8:28 PM
Wednesday, July 15, 2015 8:26 PM