daily pastebin goal
33%
SHARE
TWEET

Untitled

a guest Dec 6th, 2016 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $username = "login name"
  2. $password = "your pass"
  3. $secstr = New-Object -TypeName System.Security.SecureString
  4. $password.ToCharArray() | ForEach-Object {$secstr.AppendChar($_)}
  5. $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $secstr
  6.  
  7. Connect-PnPOnline -Url https://sp.sharepoint.com/sites/dev/ -Credentials $cred
  8.  
  9. Get-PnPList | foreach {
  10.     if($_.BaseType -eq "DocumentLibrary"){
  11.         Write-Host $_.Title
  12.     }
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top