How to get UserProfilesmanger object for User profile service application which is not set as default in sharepoint

100 views Asked by At

I have created a new user profile service application which is not set to default yet. I want to add users to this application through PowerShell. when using the

Microsoft.office.server.userprofiles.userprofilemanager((Get-SPServiceContext -Site "http://cuz.com"))

it always contains the default(old) service application.

How can I create a user profile manager object for other application which is not set to default.

1

There are 1 answers

0
Anubhav Arora On

Finally I was able to add users to new UPA, I made this UPA as default and created PS object, executed it and switched over to old UPA(made it as default), then I created new profile through the PS object