Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $proxyAddress = "xxx.xxx.xxx.xxx"
- $proxyPort = "xx"
- $username = Read-Host -Prompt 'Enter your username'
- $passwordSecure = Read-Host -Prompt 'Enter your password' -AsSecureString
- $tmpPassword = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($passwordSecure)
- $password = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($tmpPassword)
- $serverString = "$proxyAddress`:$proxyPort"
- Set-ItemProperty -Path $reg -Name ProxyServer -type String -Value $serverString
- Set-ItemProperty -Path $reg -Name ProxyEnable -type DWORD -Value 1
- Set-ItemProperty -Path $reg -Name ProxyUser -type String -Value $username
- Set-ItemProperty -Path $reg -Name ProxyPass -type String -Value $password
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement