FIM ScriptBox Item

Summary

This script displays the permissions on the FIM site.

Script Code

001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
#------------------------------------------------------------------------------------------------------
 set-variable -name SPURL -value "http://localhost"  -option constant
#------------------------------------------------------------------------------------------------------
 [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") | Out-Null
 Clear-Host
 $spSite = New-Object -TypeName "Microsoft.SharePoint.SPSite" -ArgumentList $SPURL
 $fimSite = $spSite.AllWebs | Where-Object {$_.Name -eq "IdentityManagement"} 
 If($fimSite -eq $null) {Throw "FIM site not found"}

 Write-Host "Permissions on $($fimSite.Title)"
 Write-Host "============================================="
 $fimSite.Permissions | Format-List Member, BasePermissions
#------------------------------------------------------------------------------------------------------
 Trap
 { 
  Write-Host "`nError: $($_.Exception.Message)`n" -foregroundcolor white -backgroundcolor darkred
  Exit
 }
#------------------------------------------------------------------------------------------------------

 

note 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.

 



See Also