I try to setup PowerShell Remoting over HTTPS.
But when I try to import the Certificate I get the error "Cannot find the requested object.".
The same code works perfect on Windows 8.1.
Code: Select all
[Berry]: PS C:\> $file = gci "C:\Users\Administrator\Documents\Berry.pfx"
[Berry]: PS C:\> $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($file, "qwert123#", "MachineKeySet,PersistKeySet")
New-Object : Exception calling ".ctor" with "3" argument(s): "Cannot find the requested object.
"
At line:1 char:9
+ $cert = New-Object System.Security.Cryptography.X509Certificates.X509 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommandThx