Sunday, 26 January 2014

How to Use PowerShell to Find all Users Having no Manager in FIM Portal



# Powershell Cmdlet to find all users in portal not having manager
# Load FIMAutomation module
if(@(Get-PSSnapin | ? { $_.Name -eq "FIMAutomation" } ).Count -eq 0)
{
Add-PSSnapin FIMAutomation;
}
$users = Export-FIMConfig -customConfig "/Person[not(Manager=/Person)]" -Uri "http://localhost:5725" -OnlyBaseResources
foreach ($user in $users)
{
$x = (($user.ResourceManagementObject.ResourceManagementAttributes | Where-Object {$_.AttributeName -eq "DisplayName"}).Value)
Write-Host "$x"
}
view raw gistfile1.ps1 hosted with ❤ by GitHub

No comments:

Post a Comment

ServiceNow onboarding Sailpoint