home.net
pushd interface ip
set address name="Local Area Connection" source=static addr=192.168.1.6 mask=255.255.255.0
set address name="Local Area Connection" gateway=192.168.1.1 gwmetric=0
set dns name="Local Area Connection" source=static addr=192.168.1.2 register=PRIMARY
set wins name="Local Area Connection" source=static addr=none
popd
dhcp.net
pushd interface ip
set address name="Local Area Connection" source=dhcp
set dns name="Local Area Connection" source=dhcp register=PRIMARY
set wins name="Local Area Connection" source=dhcp
popd
These configuration files can now be invoked with netsh like so:
netsh -f home.net
netsh -f dhcp.net
Nenhum comentário:
Postar um comentário