Hi
ZebraDonkey,
According to your description, please check the link below about how to script a change to a static IP address or DHCP IP address in Windows using a batch file.
https://mikebeach.org/2012/05/02/how-to-script-a-change-to-a-static-ip-address-or-dhcp-ip-address-in-windows/
Also for a Java Script issue, I suggest that we could post the issue to the Script forum to get more help.
https://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?category=scripting
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can
either share their knowledge or learn from your interaction with us.
Thank you for your understanding.
Hope it will be helpful to you
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact
tnmff@microsoft.com.