Home > PowerShell/VI Toolkit > Connect to your VC with PowerShell

Connect to your VC with PowerShell

Every time you start your PowerShell you would use Connect-VIserver command to connect to your virtual server. You can automate this by creating a file profile.ps1. You should have VMware VI toolkit already installed. VI ToolKit Upload this file to your PowerShell directory. Usually it is C:\Windows\System32\WindowsPowerShell\v1.0 Add this line to this file and save it. Add-PSSnapin VMware.VimAutomation.Core Connect-VIserver vc -session $srv.sessionid You have to change the vc with the name of your virtual server Now every time you start PowerShell you are connected to VC

  1. No comments yet.
  1. No trackbacks yet.