UPSA Creation In SharePoint 2013 Using PowerShell Method

Ex - 1

When you create My site settings, we need a user profile Serivice Application to synchronize with the database to retrive the audience settings and the profile details.

Here, I will quickly explain about how to configure the user profile Application through UI method.

Goto SharePoint 2013 Central Admin-->Application Management-->Manage Service Applications-->Service Applications tab to enable the ribbon--> create a UPSA.

Here, we will see about PowerShell method and it is very simple to create for admins.

Syntax
  1. #Creating new Application pool in IIS  
  2. $AppPool = New-SPServiceApplicationPool -Name HostedAppPool -Account (Get-SPManagedAccount "Gowtham\SPdev")  
  3.   
  4. #Creating User profile Service application in new App pool.  
  5. $UPSA = New-SPProfileServiceApplication -Name UPA -PartitionMode  -ApplicationPool $AppPool  
  6.   
  7. Once User Profile Service is Created ypu can Verify the UPSA fields and their types,  
  8.   
  9. Syntax:  
  10. [void][reflection.assembly]::Loadwithpartialname("Microsoft.Office.Server");              
  11. $getsite=new-object Microsoft.SharePoint.SPSite("https://gowtham.sharepoint.com");              
  12. $Context = Get-SPServiceContext $getsite;              
  13. $site.Dispose();              
  14. $uuserprofilemanager = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($Context);  
  15. $userProfile = $uuserprofilemanager.GetUserProfile("Gowtham\SPdev");  
  16. $userProfile.Properties | sort DisplayName | FT DisplayName,Name,@{Label="Type";Expression={$_.CoreProperty.Type}}  
Thanks for reading my blog.
Ebook Download
View all
Learn
View all