Is it possible to use IF/Els conditional script between DHCP and static changes?
Suppose:
When I run my script it will look for value DHCP=YES then it will run static IP change scripts and when it will find the Value DHCP=NO it will run the DHCP set script.
as an example:
=============
If DHCP = yes
then run Batch1 else skip
Batch1
netsh int IP set address "local area connection" static 192.168.1.12 255.255.255.0 192.168.1.1 1
netsh int ip set dns "local area connection" static 192.168.0.254 primary
netsh int ip set dns "local area connection" static 192.168.0.253 secondary
If DHCP = no
then run Batch2 Batch2
===========================netsh int ip set address "local area connection" dhcpnetsh int ip set dns "local area connection" dhcp
something like that.
Is it possible. Would appreciate your help on this.
0 comments:
Post a Comment