PrintixService only:
& "C:\Program Files\printix.net\Printix Client\PrintixService.exe" -p http://proxy.ezorg.nl:8080 Stop-Service -Name PrintixService Start-Service -Name PrintixService
PrintixService and Windows Proxy:
$MachineRegKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings"
$UserRegKeyPath = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings"
$ProxyEnableValue = 1
$ProxyServerValue = "proxy.ezorg.nl:8080"
$ProxyOverrideValue = "<local>;*.ehsnet.nl;*.ehealthservices.nl;172.*.*.*;*pifarma.nl"
Set-ItemProperty -Path $MachineRegKeyPath -Name ProxyEnable -Value $ProxyEnableValue
Set-ItemProperty -Path $MachineRegKeyPath -Name ProxyServer -Value $ProxyServerValue
Set-ItemProperty -Path $MachineRegKeyPath -Name ProxyOverride -Value $ProxyOverrideValue
if ($?) {
Write-Output "Remediated: Machine proxy settings have been updated"
Set-ItemProperty -Path $UserRegKeyPath -Name ProxyEnable -Value $ProxyEnableValue
Set-ItemProperty -Path $UserRegKeyPath -Name ProxyServer -Value $ProxyServerValue
Set-ItemProperty -Path $UserRegKeyPath -Name ProxyOverride -Value $ProxyOverrideValue
netsh winhttp import proxy ie
Write-Output "Remediated: User proxy settings have been updated and WinHTTP settings imported"
# exit 0
} else {
Write-Output "Failed to remediate: Unable to update machine proxy settings"
# exit 1
}
& "C:\Program Files\printix.net\Printix Client\PrintixService.exe" -p http://proxy.ezorg.nl:8080
Stop-Service -Name PrintixService
Start-Service -Name PrintixService