Static to DHCP, bat file
I have this code (.bat file) that I want to run by going to each computer that is logged in and executing it. However, not all users have admin rights. Is there anything I can do without logging off to change the IP's from static to DHCP?
netsh interface ip set address name="Local Area Connection" source=dhcp
netsh interface ip set dns name="Local Area Connection" source=dhcp
You really want to do this with Group Policy. You can set this as a computer startup script and it will run as the local SYSTEM
account, which has permission to change these settings.
Otherwise, you can use psexec
to run it remotely on a machine as a privileged user.