Mistake Posted June 23, 2008 Posted June 23, 2008 (edited) I must change the ip address for machines whit a script...anyone can help me? ps: the script must run in admin mode...why the users dont have the permission tnx Edited June 23, 2008 by Mistake
ChrisL Posted June 23, 2008 Posted June 23, 2008 Something like this using netsh.exe $userName = "User" $domain = @ComputerName $password = "password" $netname = "Local Area Connection" $newIP = "192.168.2.12" $newSubnetMask = "255.255.255.0" $newDG = "192.168.2.1" RunAs($userName,$domain,$password,0,'netsh interface ip set address name=' & '"' & $netname & '" static ' & $newIP & ' ' & $newSubnetMask & ' ' & $newDG & ' 1') [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
Mistake Posted June 23, 2008 Author Posted June 23, 2008 (edited) Something like this using netsh.exe $userName = "User" $domain = @ComputerName $password = "password" $netname = "Local Area Connection" $newIP = "192.168.2.12" $newSubnetMask = "255.255.255.0" $newDG = "192.168.2.1" RunAs($userName,$domain,$password,0,'netsh interface ip set address name=' & '"' & $netname & '" static ' & $newIP & ' ' & $newSubnetMask & ' ' & $newDG & ' 1') tnx Edited June 23, 2008 by Mistake
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now