powershell script to register VMWare Workstation VMs

First realise that Powershell ISE in installed on windows 8 (and 8.1) by default!

Turn on Script Execution

Run powershell as administrator and run:

PS C:\Windows\system32> Get-ExecutionPolicy
Restricted
PS C:\Windows\system32> Set-ExecutionPolicy RemoteSigned

Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
http://go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is “Y”):
PS C:\Windows\system32> Get-ExecutionPolicy
RemoteSigned

Adding

Obtaining Help

Run Powershell Ise as Admin and enter

Update-Help

to get the help files

Adding vmrun.exe to path

Go to Control Panel – System – Advanced – Environment Variables

Edit System Variable Path and add

;C:\Program Files (x86)\VMware\VMware Workstation

to the end of the path

Powershell Script to register VM’s

Script which when passed a location for VMWare Workstation virtual machines registers each vm with the gui.by opening and closing it! http://www.smooth1.co.uk/powershell/vmreg.ps1

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s