Guest User

Untitled

a guest
Jan 27th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. $SiteUrl = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  2. $UserName="xxxxxxxxxxxxxxxxxxxxxx"
  3. $Password ="xxxxxxxxxxxxxxxxxxxxx"
  4. $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName,(ConvertTo-SecureString $Password -AsPlainText -Force))
  5. $Context = New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl)
  6. $Context.Credentials = $credentials
Add Comment
Please, Sign In to add comment