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