$ErrorActionPreference = "SilentlyContinue"
$registro1 = "hklm:\SYSTEM\CurrentControlSet\Services\PolicyAgent"
$valor1 = "AssumeUDPEncapsulationContextOnSendRule"
$registro2 = "hklm:\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy"
$valor2 = "IPsecThroughNAT"
set-location $registro1
if(Get-ItemProperty -path . -name $valor1) {
Set-ItemProperty -Path . -Name $valor1 -value 2
} else {
New-ItemProperty -Path . -name $valor1 -value 2
}
set-location $registro2
if(Get-ItemProperty -path . -name $valor2) {
Set-ItemProperty -Path . -Name $valor2 -value 2
} else {
New-ItemProperty -Path . -name $valor2 -value 2
}
No hay comentarios:
Publicar un comentario