$url = "http://sharepointserver/"
$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
$name = $userProfile.DisplayName
$myprop= $userProfile["MypropertyName"]
Write-Host "$name;$myprop"
}
No comments:
Post a Comment