• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

login script

lilbstrd

n00b
Joined
Apr 14, 2006
Messages
29
Is there a way to create a login script that would update (change) the DNS server ip addresses in IP (TCP/IP) properties for staticly addressed pc's?

I have built two servers specifically designed for DC responsabilities and would like to change the authentification IP addresses for each pc on the network, and that would run when the user logs in as an administrative script and auto-reboot the pc with no user interaction.

Thanks
 
not sure on you network setup, but wouldnt you just change the dns servers on your dhcp server, then client pc's would update the servers when they start the pc ?


NM , just noticed you stated static Ip's

you can see some examples here
 
Here is a script I wrote to update TCP/IP settings. you should be able to modify it to do just dns settings if that all you need.

Option Explicit

Dim NetworkAdapter, AdapterConfiguration 'Objects
Dim IPAddress, SubnetMask, Gateway, DNS 'String Arrays
Dim RetVal 'Integers

For Each NetworkAdapter In
GetObject("winmgmts:").InstancesOf("Win32_NetworkAdapter")
If NetworkAdapter.AdapterType = "Ethernet 802.3" Then
For Each AdapterConfiguration In GetObject("winmgmts:").InstancesOf
("Win32_NetworkAdapterConfiguration")
If UCase(AdapterConfiguration.ServiceName) = UCase(NetworkAdapter.ServiceName) Then
IPAddress = Array("192.168.128.248")
SubnetMask = Array("255.255.255.0")
Gateway = Array("192.168.248.1")
DNS = Array("192.168.127.28","192.168.20.29")

RetVal = AdapterConfiguration.EnableStatic(IPAddress, SubnetMask)
If Not RetVal = 0 Then
WScript.Echo "Failure assigning IP/Subnetmask."
End If
RetVal = AdapterConfiguration.SetGateways(Gateway)
If Not RetVal = 0 Then
WScript.Echo "Failure assigning Gateway."
End If
RetVal = AdapterConfiguration.SetDnsServerSearchOrder(DNS)
If Not RetVal = 0 Then
WScript.Echo "Failure assinging DNS search order."
End If
End If
Next
End If
Next
 
I found this great little script from McNeillware that is setup to run from my pc and update the DNS sever ip's of networked pc's with a series of forms that I can input the ip sddresses I want and it changes them remotly for me.
 
Back
Top