Change Static IPs to DHCP Remotely

How to change static IP address to DHCP remotely?

1. Download the PsExec program from Microsoft

Link

2. Extract and install the PSEXEC program

3. Run the PsExec with the following commands

e.g.
psexec \\servername -u username -p password netsh interface ip set dns “Local Area Connection” dhcp
psexec \\servername -u username -p password
netsh interface ip set address “Local Area Connection” dhcp
psexec \\servername -u username -p password ipconfig /renew