Author Posts

August 21, 2017 at 5:32 pm

I am trying to reproduce this key , here is the .reg example

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\SecurityProviders\SCHANNEL\Ciphers\AES 128/128]
"Enabled"=dword:ffffffff

In powershell I am trying this

if((Test-Path "HKLM:\SYSTEM\ControlSet001\Control\SecurityProviders\SCHANNEL\Ciphers\AES 128/128") -ne $true) {  New-Item "HKLM:\SYSTEM\ControlSet001\Control\SecurityProviders\SCHANNEL\Ciphers\AES 128/128" -force -ea SilentlyContinue -Verbose };

Instead of creating one key like "HKLM:\SYSTEM\ControlSet001\Control\SecurityProviders\SCHANNEL\Ciphers\AES 128/128"
its creating 2 keys like this
HKLM:\SYSTEM\ControlSet001\Control\SecurityProviders\SCHANNEL\Ciphers\AES 128" with a sub key of 128. I think the / character is causing this .

Any help would be greatly appreciated !

August 22, 2017 at 5:29 pm

Try it this way:

if(-not (Test-Path 'HKLM:\SYSTEM\ControlSet001\Control\SecurityProviders\SCHANNEL\Ciphers\AES 128/128')) {  New-Item 'HKLM:\SYSTEM\ControlSet001\Control\SecurityProviders\SCHANNEL\Ciphers\AES 128/128' -Force -ErrorAction SilentlyContinue -Verbose }