The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: Create User Profile Sub-Types in SharePoint 2010 using Powershell
1 Comment
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.

deepika tyagiPosted Jul 14, 2015, 9:04 AM
Thanks. But i could not get the context of UPA by the above code. This worked for me: function Get-SPServiceContext([Microsoft.SharePoint.Administration.SPServiceApplication] $profileApp) { $profileApp = @(Get-SPServiceApplication | ? {$_.TypeName -eq "User Profile Service Application"})[0] return [Microsoft.SharePoint.SPServiceContext]::GetContext($profileApp.ServiceApplicationProxyGroup,[Microsoft.SharePoint.SPSiteSubscriptionIdentifier]::Default) } $context = Get-SPServiceContext