Changing the values of TCP/IP interfaces
Morning All,
I have to come up with a way of setting the NameServer value under for following key.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{GUID}]
"NameServer"="10.110.x.x,10.110.x.x"
The problem being the GUID is unique to each interface and many of my machines have more than one NIC/interface. I can’t find a way to return the interface GUID and I'm not quite sure how to deal with the multiple NICs issue. It would be acceptable to change the NameServer value for all interfaces.
Any ideas? I’m stumped.
Charlie
I have to come up with a way of setting the NameServer value under for following key.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{GUID}]
"NameServer"="10.110.x.x,10.110.x.x"
The problem being the GUID is unique to each interface and many of my machines have more than one NIC/interface. I can’t find a way to return the interface GUID and I'm not quite sure how to deal with the multiple NICs issue. It would be acceptable to change the NameServer value for all interfaces.
Any ideas? I’m stumped.
Charlie
0 Comments
[ + ] Show comments
Answers (5)
Please log in to answer
Posted by:
jmcfadyen
16 years ago
Posted by:
fuz_kitten
16 years ago
Posted by:
anonymous_9363
16 years ago
You don't really need Scriptomatic: it just makes using WMI easier. However, WMI is just like any other object: just 'connect' to it and use its propertiesd and methods. You will still be faced with WMI's obscure syntax whether or not you use Scriptomatic so, if it were me, I'd be Goggling for some examples. You could do worse than start here. About midway down is the section 'Networking'.
Posted by:
jmcfadyen
16 years ago
scriptomatic as vbscab mentioned is just a tool to make life a little easier.
select the classes named in the post above.
it will then write a bunch of vbs code which can manipulate each of the settings which belong to the class.
cut and paste the bits you want to use.
alternatively theres some good detail on the real men dont click website ..
select the classes named in the post above.
it will then write a bunch of vbs code which can manipulate each of the settings which belong to the class.
cut and paste the bits you want to use.
alternatively theres some good detail on the real men dont click website ..
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.