Error needs to be clearer when decrypting and specifying a cert with no private key. Error that comes up: Message : Object reference not set to an instance of an object. It should be more clear, or at least check the cert being passed to ensure HasPrivateKey = $true