Advertisement
Guest User

Untitled

a guest
Oct 9th, 2017
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. Add-Type -Path "C:Program FilesCommon Filesmicrosoft sharedWeb Server Extensions16ISAPIMicrosoft.SharePoint.Client.dll"
  2. Add-Type -Path "C:Program FilesCommon Filesmicrosoft sharedWeb Server Extensions16ISAPIMicrosoft.SharePoint.Client.Runtime.dll"
  3. $siteUrl = "https://contoso.sharepoint.com"
  4. $adminUsername = "admin@contoso.onmicrosoft.com"
  5. $secureAdminPassword = Read-Host -AsSecureString "please enter password"
  6. $credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($adminUsername, $secureAdminPassword)
  7.  
  8. $credential = Import-Clixml "C:somepathsecurePassword.xml"
  9.  
  10. $plainPassword = "Plain text"
  11. $secureString = ConvertTo-SecureString $plainPassword -AsPlainText -Force
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement