Forum Discussion
Heiko Watz
Dec 19, 2016Iron Contributor
Store password in Windows credential manager and use it in Powershell
On the #ESPC16 in Vienna someone is showing a way to store credentials in the Windows credential manager and then use is in Powershell to connect to Exchange / SharePoint / Azure⦠online. It was a v...
- Jan 05, 2017
We use a class which is available in the PnP Core module to use retrieve credentials from the Windows Credential Manager. That class you can find here :
This would require you to either rewrite that to PowerShell, or use the PnP Core assembly in your project (or simply copy over this class to your own binary PowerShell module code).
Alternatively you could install the PnP PowerShell cmdlets (install-module sharepointpnppowershellonline) and forget about all the other cmdlets and use:
Get-PnPStoredCredential -Name "nameofthecredential" -Type PSCredential
Zoltan Bagyon
Dec 19, 2016Iron Contributor
It's not exactly the same you asked for but it does the job so might be helpful: