cls

Add-PSSnapin Microsoft.SharePoint.PowerShell -ea 0
$site = New-Object Microsoft.SharePoint.SPSite("http://sitecollection")
$webs = $site.AllWebs
## export by user
foreach($web in $webs)
{
    $users = $web.Users
    $web.Name
    foreach($user in $users)
    {
        "  " +  $user.Name + " , " + $user.Roles
    }
}

## export by group
#$groups = $site.RootWeb.sitegroups
#foreach ($mygroup in $groups)
#{
#    "Group: " + $mygroup.name;
#    foreach ($user in $mygroup.users)
#    {
#        " User: " + $user.name
#    }
#}
$site.Dispose()

相关文章:

  • 2021-11-18
  • 2021-12-30
  • 2022-12-23
  • 2022-01-01
  • 2021-12-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-01-21
  • 2021-12-05
  • 2021-06-06
  • 2021-11-22
相关资源
相似解决方案