Friday 4 July 2014

Find UserProfile using PowerShell /Find User in UserProfile Using PowerShell Script


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



OutPut:



No comments:

Post a Comment