<# Please do not anything in the production enviroment unless and untill you are very much sure #>
# Load FIMAutomation module
if(@(Get-PSSnapin | ? { $_.Name -eq "FIMAutomation" } ).Count -eq 0)
{
Add-PSSnapin FIMAutomation;
}
$groups = Export-FIMConfig -customConfig "/Group[Owner !=/Person]" -Uri "http://localhost:5725" -OnlyBaseResources
foreach ($group in $groups)
{
$x = (($group.ResourceManagementObject.ResourceManagementAttributes | Where-Object {$_.AttributeName -eq "DisplayName"}).Value)
Write-Host "Groups are $x"
}
# Load FIMAutomation module
if(@(Get-PSSnapin | ? { $_.Name -eq "FIMAutomation" } ).Count -eq 0)
{
Add-PSSnapin FIMAutomation;
}
$groups = Export-FIMConfig -customConfig "/Group[Owner !=/Person]" -Uri "http://localhost:5725" -OnlyBaseResources
foreach ($group in $groups)
{
$x = (($group.ResourceManagementObject.ResourceManagementAttributes | Where-Object {$_.AttributeName -eq "DisplayName"}).Value)
Write-Host "Groups are $x"
}
No comments:
Post a Comment