Add-PSSnapin Microsoft.SharePoint.PowerShell
$site=Get-SPSite "https://site.drizzleinfotech.in"
$serviceContext = Get-SPServiceContext $site;
$upm = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext);
$userProfile = $upm.GetUserProfile("raghur@drizzleinfotech.in");
foreach($userProfile in $upm)
{
$userProfile["PropertyName"].Value = "Test Value";
$userProfile.Commit()
}
No comments:
Post a Comment