I'm having trouble getting Get-SPServiceContext
to return a SiteSubscriptionId that is not a bunch of zeros. I'm using an account 'SP_Sync' and set permissions to
- Farm Administrators group
- User Profile Service App /w Full control
- SPShellAdmin
Is there any other permissions I need?
UPDATE:
I'm trying to access the user profile manager in powershell. All the examples I've seen are loading the context of the site in the userpfilemanager object. I can't seem to find the permissions I need to access this object.
I thought it was related to the SPServiceContext, but I can't actually run the command
New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager
I'm receiving the error:
New-Object : Exception calling ".ctor" with "0" argument(s): "Value cannot be null. Parameter name: serviceContext" At line:1 char:19 + $profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileMan ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand