2

I am checking how to make the proxy settings of a windows VM by using desired state configuration (DSC) in Azure. Is there a library of DSC?

Normally, i am using below commands to set the proxy from the cli:

Set-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name ProxyServer -Value "123.123.123.123:80"
Set-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name ProxyEnable -Value 1

netsh winhttp set proxy 123.123.123.123:80

Any idea?

MoonHorse
  • 1,966
  • 2
  • 24
  • 46

1 Answers1

0

You may try with Script resource. In that resource, you may use TestScript and/or GetScript property to check if proxy setting is already set as required. If proxy setting is already not set then use SetScript property to actually set proxy setting using cmdlets you have provided.

KrishnaG
  • 3,340
  • 2
  • 6
  • 16