$ReportFile="C:\Temp\SitePermissionRpt.csv" Write-host -f Red "Error Generating Site Permission Report!" $_.Exception.Message Write-host -f Green "Site Permission Report Generated Successfully!" #Call the function with RootWeb to get site collection permissions #Iterate through each subsite in the current web Write-host -f Yellow "`t Getting the Permissions of Lists and Libraries in "$Web.URL"." If($web.HasUniqueRoleAssignments -eq $true) $Web.Retrieve("HasUniqueRoleAssignments") Write-host -f Yellow "Getting the Permissions of Web "$Web.URL"." #Call the function to Get Lists of the web #Function to Get Webs's Permissions from given URLįunction Get-SPOWebPermission($Web) If( $List.HasUniqueRoleAssignments -eq $True) $List.Retrieve("HasUniqueRoleAssignments") #Function to Get Permissions of all lists from the webįunction Get-SPOListPermission($Web) "" While ($Query.ListItemCollectionPosition -ne $null) #Function to Get Permissions Applied on a particular Object, such as: Web, List or Itemįunction Get-Permissions($Object) Please refer to the following powershell script #sharepoint online powershell permissions reportĪdd-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\"Īdd-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\.dll" We can only get permission report of sitecollections. Per my research, there is no such function to retrieve sharepoint site by users permission.
0 Comments
Leave a Reply. |