Skip to content

Instantly share code, notes, and snippets.

@vaderj
Last active June 11, 2018 20:39
Show Gist options
  • Save vaderj/14997dbe9642deb3f0430eca181d46bd to your computer and use it in GitHub Desktop.
Save vaderj/14997dbe9642deb3f0430eca181d46bd to your computer and use it in GitHub Desktop.
PowerShell - Open prompt as Admin user who has access, set URL var, run command #PowerShell #SharePoint
$url = "."
new-spuser -UserAlias 'domain\userName' -web $url -SiteCollectionAdmin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment