How to Use PowerShell to List the Configured Management Agents in FIM
FIM ScriptBox Item
Summary
The script lists the management agents that are configured on your system.
Script Code
001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 |
#------------------------------------------------------------------------------------------------- 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 1 } #------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- |
Note
To provide feedback about this script, create a post on the FIM TechNet Forum.
For more FIM related Windows PowerShell scripts, see the FIM ScriptBox.