Skip to content

PS script to change computer name to a random one + renew DHCP lease

Notifications You must be signed in to change notification settings

acnrayd/vm_template_staging_ps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

vm_template_staging_ps

PS script to change computer name to a random one + renew DHCP lease

I have created VM templates for Windows Server OS on my ESXi environment for rapid testing purposes. But after creating a new VM from a template, I had two main problems:

  1. Because all VM's created from this template have same computer name, it creates conflicts.
  2. Sometimes I had IP conflicts as well, because all VM's created from same template still have the same IP.

So basically this Powershell script just randomises a new computer name, changes it, also renews the DHCP lease, restarts the computer and completes the staging for my environment. Simple but useful.

About

PS script to change computer name to a random one + renew DHCP lease

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published