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