powershell icon indicating copy to clipboard operation
powershell copied to clipboard

[BUG] Documentation on connecting to SharePoint is incorrect

Open MartinHatchUK opened this issue 3 years ago • 2 comments

Pretty simple this one

The articles on "Connecting with PnP PowerShell" do not include the -CertificatePassword parameter https://github.com/pnp/powershell/blob/dev/pages/articles/connecting.md

This means anyone who is trying to connect using a PFX certificate (or Base64 encoding) may not realise (or forget) to include the password value

...

Note - The error when the password is NOT included is an equally helpful "The specified network password is not correct."

A more specific "The password to access the certificate file was missing, please use the -CertificatePassword parameter" might also be a bit more helpful?

MartinHatchUK avatar Feb 13 '23 15:02 MartinHatchUK

Fair point @MartinHatchL365. Normally we would not be able to do much about it as changing the output to something that's more clear might break existing scripts which are handling that exact message and/or type of exception. With 2.0 of PnP PowerShell coming we can make breaking changes. I'm proposing to change it to this. Do you think this will be more useful?

image

I've also updated the documentation to make it clearer how to work with certificates having a password on them.

PR https://github.com/pnp/powershell/pull/2826 will merge these changes.

KoenZomers avatar Feb 15 '23 23:02 KoenZomers

Closing this as it has been merged via #2826 , the docs will be updated tomorrow and the code will be available via tomorrow's nightly.

Thanks for raising the issue, much appreciated !

gautamdsheth avatar Feb 22 '23 13:02 gautamdsheth