2016-03-23 8 views
2

. Bitte helfen Sie weiter unten.Ausnahme bei der Verwendung von ConvertFrom-SecureString mit Schlüssel

Versucht, eine Zeichenfolge mit einem Schlüssel zu verschlüsseln. Beim Erzeugen eines verschlüsselten Wertes wird ein Fehler unterschritten. Wo kann ich das gleiche auf einem anderen Server ohne Problem tun.

Verglichen auf Powershell-Version und gefunden, beide Server haben identische Versionen. Irgendwelche Hinweise?

$Key = (1..16) 
$SecureString = ConvertTo-SecureString -String "mypw" -AsPlainText -Force 
ConvertFrom-SecureString -SecureString $SecureString -Key $Key 

Empfangen von Below Ausnahme:

ConvertFrom-SecureString : Exception has been thrown by the target of an invocation. 
At line:1 char:1 
+ ConvertFrom-SecureString -SecureString $SecureString -Key $Key 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : NotSpecified: (:) [ConvertFrom-SecureString], TargetInvocationException 
    + FullyQualifiedErrorId : System.Reflection.TargetInvocationException,Microsoft.PowerShell.Commands.ConvertFromSec 
    ureStringCommand 

$ error [0] .Exception | Format-List * -force

Message  : Exception has been thrown by the target of an invocation. 
Data   : {} 
InnerException : System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS 
       validated cryptographic algorithms. 
        at System.Security.Cryptography.RijndaelManaged..ctor() 
TargetSite  : System.Object InvokeMethod(System.Object, System.Object[], System.Signature, Boolean) 
StackTrace  : at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, 
       Boolean constructor) 
        at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, 
       Object[] parameters, CultureInfo culture) 
        at System.Security.Cryptography.CryptoConfig.CreateFromName(String name, Object[] args) 
        at System.Security.Cryptography.SymmetricAlgorithm.Create(String algName) 
        at Microsoft.PowerShell.SecureStringHelper.Encrypt(SecureString input, Byte[] key, Byte[] iv) 
        at Microsoft.PowerShell.Commands.ConvertFromSecureStringCommand.ProcessRecord() 
        at System.Management.Automation.CommandProcessor.ProcessRecord() 
HelpLink  : 
Source   : mscorlib 
HResult  : -2146232828 

Antwort

0

FIPS Verschlüsselungsalgorithmen ist ein Problem hier.

Zum HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa. und Unterschlüssel FipsAlgorithmPolicy oder ändern DWORD von 1 auf 0 für Unterschlüssel FipsAlgorithmPolicy und starten Sie Ihren Computer

Hier a link

löschen
Verwandte Themen