Skip to content

Instantly share code, notes, and snippets.

@maxali
Last active February 16, 2019 16:39
Show Gist options
  • Save maxali/4655b6aefe8e780f20abe205d2fba483 to your computer and use it in GitHub Desktop.
Save maxali/4655b6aefe8e780f20abe205d2fba483 to your computer and use it in GitHub Desktop.
Windows Credentials Manager with PnP PowerShell
# store your App Password in Windows Credential Manager.
Add-PnPStoredCredential -Name mycredential -Username contosoadmin@contoso.onmicrosoft.com -Password (ConvertTo-SecureString -String "mycontosopass" -AsPlainText -Force)
# use the saved App Password credentials whenever you try to login to pnp
Connect-PnPOnline -Url https://contoso.sharepoint.com -Credentials mycredential
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment