ok thanks. PowerCLI won't work in this case as I need to use this on new hosts that haven't been joined to vcenter server yet and are in a new subnet. Also, is there anyway to write that script to a file, and then download the file to my pc, given that I can't connect yet with putty but only through the esxi shell since the networking is still not configured yet when I'm doing this research?