only My site

Wednesday, February 29, 2012

Sharepoint 2010 : User Permission Report

Usually we may required a report to show to the management that who is doing what role and their permissions. We need to use Power shell for this.

To display the output in the screen
$urlWeb = "http://BalaOnWeb.Com/Public"
Get-SPUser -Web $urlWeb select UserLogin, @{name="Exlicit given roles";expression={$_.Roles}}, @{name="Roles given via groups";expression={$_.Groups %{$_.Roles}}},Groups format-Table -Wrap


To display the output in a Text file
Get-SPUser -Web $urlWeb select UserLogin, @{name="Exlicit given roles";expression={$_.Roles}}, @{name="Roles given via groups";expression={$_.Groups %{$_.Roles}}},Groups format-Table -Auto Out-File c:\scripts\13UserPermissionsReport-security.txt


Get-SPUser -Web $urlWeb select UserLogin, @{name="Exlicit given roles";expression={$_.Roles}}, @{name="Roles given via groups";expression={$_.Groups %{$_.Roles}}},Groups format-Table -Wrap Out-File c:\scripts\13UserPermissionsReport-security.txt


No comments: