I have a fixlet that among other things sets the static IP address for workstations that then get shipped to our remote offices (no DHCP there). It works fine on most Windows 10 computers but there are some where it does not run correctly. When I run the exact same command manually on the system using psexec it sets the IP address correctly. IPs obfuscated to protect the innocent:
if {exists (operating system) whose (it as string as lowercase contains “Win10” as lowercase)}
dos netsh interface ip set address name=“Ethernet” static “{key “ip” of section “config” of file “C:\Windows\Setup\Scripts\config.ini”}” “255.255.255.0” “{key “gateway” of section “config” of file “C:\Windows\Setup\Scripts\config.ini”}” "0"
dos netsh interface ip set dns name=“Ethernet” static "0.0.0.0"
dos netsh interface ip add dns name=“Ethernet” addr="0.0.0.0"
else
dos netsh interface ip set address name=“Local Area Connection” static “{key “ip” of section “config” of file “C:\Windows\Setup\Scripts\config.ini”}” “255.255.255.0” “{key “gateway” of section “config” of file “C:\Windows\Setup\Scripts\config.ini”}” "0"
dos netsh interface ip set dns name=“Local Area Connection” static "0.0.0.0"
dos netsh interface ip add dns name=“Local Area Connection” addr="0.0.0.0"
endif