In the below Powershell script We are trying to find an user from UserProfile
clear
asnp "*sh*"
$site=new-object Microsoft.SharePoint.SPSite("http://SP2013dev.local/");
$serviceContext = Get-SPServiceContext
$site;
$site.Dispose();
$upm = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext);
$userProfile = $upm.GetUserProfile("Manjunath");
$userProfile.AccountName
No comments:
Post a Comment