locked
get the "Run As Account" associated with "Run As Profile" RRS feed

  • 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,

    Mukul
    Monday, 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}


    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}


    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