$serverPath = "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" $workstationPath = "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" Set-ItemProperty -Path $serverPath -Name "EnableSecuritySignature" -Value 1 -Type DWord Set-ItemProperty -Path $serverPath -Name "RequireSecuritySignature" -Value 0 -Type DWord Set-ItemProperty -Path $workstationPath -Name "EnableSecuritySignature" -Value 1 -Type DWord Set-ItemProperty -Path $workstationPath -Name "RequireSecuritySignature" -Value 0 -Type DWord # Restart the services for changes to take effect - no need to reboot Restart-Service -Name LanmanServer -Force Restart-Service -Name LanmanWorkstation -Force Set-SmbClientConfiguration -EnableInsecureGuestLogons $true -Force Set-SmbClientConfiguration -RequireSecuritySignature $false -Force Set-SmbServerConfiguration -RequireSecuritySignature $false -Force