Resources for IT Professionals > Forums Home > Identity Management Forums > Identity Lifecycle Manager 2 > Using PowerShell to list the configured management agents
Ask a questionAsk a question
 

General DiscussionUsing PowerShell to list the configured management agents

  • Friday, November 06, 2009 8:03 PMMarkus VilcinskasMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    #------------------------------------------------------------------------------------------------------------
    write-host "`nConfigured Management Agents"
    write-host "============================"
    $lstMA = @(get-wmiobject -class "MIIS_ManagementAgent" -namespace "root\MicrosoftIdentityIntegrationServer"`
    -computername ".")
    if($lstMA.count -eq 0) {throw "There is no management agent configured"}
    $lstMA | format-list -property Name, Type, Guid
    #------------------------------------------------------------------------------------------------------------
    trap
    {
    Write-Host "`nError: $($_.Exception.Message)`n" -foregroundcolor white -backgroundcolor darkred
    Exit
    }
    #------------------------------------------------------------------------------------------------------------

    Markus Vilcinskas, Knowledge Engineer, Microsoft Corporation