none
Powershell Script for Getting Site owner and Unique permission RRS feed

  • Question

  • Hi 

    I am looking for a Powershell script

    1. to find out Site owner of all the sites in a site collection but only to one level.

    2. And also a record of unique permission in all the sites inside site collection only to one level.

    Please help

    Thank you


    Paru

    Friday, March 31, 2017 12:21 PM

All replies

  • Hi Paru

    Try this,

    $webApp = Get-SPWebApplication("http://siteurl")
    foreach ($site in $webApp.Sites)
    {
    write $site | format-table -property Url,Owner,Quota
    }

    Friday, March 31, 2017 12:34 PM
  • Hi

    Already tried this one and the below was the result

    Displaying site permissions for: xxx
    Member          : Viewers
    BasePermissions : ViewListItems, ViewVersions, ViewFormPages, Open, ViewPages, CreateSSCSite, BrowseUserInfo, UseClientIntegration, UseRemoteAPIs, CreateAlerts

    Member          : xxx Owners
    BasePermissions : FullMask

    Member          : xxx Visitors
    BasePermissions : ViewListItems, OpenItems, ViewVersions, ViewFormPages, Open, ViewPages, CreateSSCSite, BrowseUserInfo, UseClientIntegration, UseRemoteAPIs, CreateAlerts

    Member          : xxx Members
    BasePermissions : ViewListItems, AddListItems, EditListItems, DeleteListItems, OpenItems, ViewVersions, DeleteVersions, ManagePersonalViews, ViewFormPages, Open, ViewPages, CreateSSC
                      Site, BrowseDirectories, BrowseUserInfo, AddDelPrivateWebParts, UpdatePersonalWebParts, UseClientIntegration, UseRemoteAPIs, CreateAlerts, EditMyUserInfo

    Member          : SHAREPOINT\system
    BasePermissions : ViewFormPages, Open, BrowseUserInfo, UseClientIntegration, UseRemoteAPIs


    Paru

    Monday, April 3, 2017 9:38 AM
  • Hi Paru

    I have written a script to return groups and unique permissions using CSOM and PowerShell.

    https://gallery.technet.microsoft.com/CSOM-Query-All-Unique-e60f2148?redir=0

    Hopefully it is useful.

    Cheers

    Reshmee

    Monday, April 3, 2017 11:12 AM