Hi, I am newbee to this forum, I don’t know whether post here is right.
I wanna to change the clinents WINS server address, now most of the clients and servers have 2 or more NIC cards, I wanna change the specify card WINS address. eg: need change Public network, Private Network, no change for the Backup network’s WINS address. so Would you pls give me some sample BES script? Thx.
That’s kinda funny. I was just working on something like this last week. You can give this a try:
Relevance:
(name of operating system as lowercase =
"winxp" or name of operating system as lowercase =
"win2003") and ((primary wins server of adapters whose (cidr string of it = wake on lan subnet cidr string) of network !=
"192.168.1.1") and (primary wins server of adapters whose (cidr string of it = wake on lan subnet cidr string) of network !=
"192.168.1.2")) and ((secondary wins server of adapters whose (cidr string of it = wake on lan subnet cidr string) of network !=
"192.168.1.2") and (secondary wins server of adapters whose (cidr string of it = wake on lan subnet cidr string) of network !=
"192.168.1.1"))
Action:
waithidden netsh
interface ip set wins name=
"{friendly name of adapters whose (cidr string of it = wake on lan subnet cidr string) of network}"
static addr=192.168.1.1 waithidden netsh
interface ip add wins name=
"{friendly name of adapters whose (cidr string of it = wake on lan subnet cidr string) of network}" addr=192.168.1.2 index=2
Okay, the “cidr string of it” is the recommended way to check for the “primary ip address” of a box based off a few posts on this forum. I put in bogus 192 IP addresses for an example, just replace .1 with your primary and .2 with your secondary WINS servers. The reason I check for both the primary and secondary for either address is because for some reason the netsh command is putting the secondary adapter as the primary even though I have the index set as 2. I really don’t care what order they are in as long as they are both there. Also, I have it checking for WinXP or Win2003 because the “cidr string of it” trick does not appear to work on Win2k. Let me know if you have any questions.
FYI: This should thread should probably be moved to “Fixlet Authoring”