Tag Archive: file

Jan 05

Add an Entry to ESXi /etc/hosts using PowerShell

I was looking for away to easily add an entry to an ESXi host’s /etc/hosts file without using SSH to connect to the host. ESXi has a file management interface which can be accessed with standard GET/PUT operations. I put together a quick example of doing this with PowerShell using Invoke-WebRequest.