質問

I'd like to have a list of all users with all of their user profile properties. How can this be done with PowerShell?

役に立ちましたか?

解決

This works for me. Also, you can check this post.

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue;
cls
$url = "http://sharepointsite/sites/dev"
$site = Get-SPSite $url
$context = Get-SPServiceContext $site
$profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)
$profiles = $profileManager.GetEnumerator()

while ($profiles.MoveNext()) {

  $userProfile = $profiles.Current 
  foreach($property in $userProfile.Properties)
  {
    Write-Host $property.Name --> $userProfile[$property.Name]
  }
}
ライセンス: CC-BY-SA帰属
所属していません sharepoint.stackexchange
scroll top