0

I am using SP2013 onpremises. I'm using an account which is a Farm administrator and a Shell Administrator and a local admin on the SP Server.

I am running a Set-SPUser command and receiving the 'Cannot find an SPWeb object with Id or Url: ". The URL is correct. I'm able to navigate to it with the account I'm executing the command with.

Set-SPUser -Identity $User -Web $spsite -email $email -SyncFromAD

where: $User contains the domain\username (no claims identifier)

$spsite contains the FQDN to the site with no trailing slash or spaces.

$email is the users's properly formatted email address.

I should not that this is happening with a specific URL. I'm able to get the spweb to a site that was setup earlier. We use host named site collections on our farm.

Any ideas??

1 Answer 1

0

Turns out my account had not been given membership to many of the newly created sites. I added the account to the sites and set the shell admin for that user on the DB I was working with and was able to get the spweb object.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.