pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
989 stars 662 forks source link

Improve error messages when a valid certificate cannot be loaded from the given path #2888

Closed jackpoz closed 4 years ago

jackpoz commented 4 years ago

Before creating a pull request, make sure that you have read the contribution file located at

https://github.com/pnp/PnP-PowerShell/blob/dev/CONTRIBUTING.md

Type

Related Issues?

Improves the troubleshooting of #2879

What is in this Pull Request ?

This PR improves the error messages displayed when a valid certificate cannot be loaded from the given path.

Handled cases:

  1. The path is a folder (before it would say "Access to Path 'C:\Temp' is denied") image

  2. The path doesn't exist at all image

  3. The path is an empty file (before it would say "Array may not be empty or null") image

Guidance

erwinvanhunen commented 4 years ago

Thanks!