PS1 - Window10ENT, Скрипт для изменения значений DWORD в реестре [закрыт]
Может ли кто-нибудь помочь мне создать PowerShell сценарий, который изменяет значение DWORD ConnectionType на 1, а значение DWORD DeferFlags на 4 в реестре пользователей в разделе HKCU:Network[drive letter].
$registryPath = "HKCU:NetworkG";
If(!(Test-Path $registryPath))
{
New-Item -Path $registryPath -Force;
New-ItemProperty -Path $registryPath -Name "Connection Type" -Value 1 -PropertyType DWORD -Force;
New-ItemProperty -Path $registryPath -Name "DeferFlags" -Value 4 -PropertyType DWORD -Force;
} Else {
New-ItemProperty -Path $registryPath -Name "Connection Type" -Value 1 -PropertyType DWORD -Force;
New-ItemProperty -Path $registryPath -Name "DeferFlags" -Value 4 -PropertyType DWORD -Force;
}