Saturday, 29 September 2012

Add VMware to your PowerShell (and Exchange if you want..)


  1. Download the necessary PowerCLI software (vSphere PowerCLI: Windows PowerShell interface for managing vSphere):
  2. Install
  3. Write the following script, save as a PS1 file and place it in %windir%\system32\WindowsPowerShell\v1.0\ Microsoft.PowerShell_profile.ps1

(Get-Host).ui.rawUI.Foregroundcolor = "green"
(Get-Host).ui.rawUI.Backgroundcolor = "black"
(Get-Host).ui.rawUI.WindowTitle = "The Power of the Shell"
Add-PsSnapin Microsoft.Exchange.Management.PowerShell.Admin -ErrorAction SilentlyContinue
Add-PSSnapin VMware.VimAutomation.Core


To test it type cls then get-snapin and you should see the VMware snapin preloaded.

No comments:

Post a Comment