PowerShell, PowerCLI, and vCenter Connection - absentee-neptune/SYS-480 GitHub Wiki

Install PowerShell on xubuntu-wan

  • Open the terminal in xubuntu-wan
  • Use the following command to install Powershell
    • sudo snap install powershell --classic

Install Microsoft VS Code on xubuntu-wan

  • Open the terminal in xubuntu-wan
  • Use the following command to install Microsoft VS Code
    • sudo snap install code --classic
  • Install an extension to use PowerShell
    • code --install-extension ms-vscode.Powershell

Running PowerShell on xubuntu-wan

  • In the terminal run: pswh
    • This will enter you in the PowerShell Command Line

Installing PowerCLI through PowerShell

  • Install the PowerCLI Module while in the PowerShell Command Line
    • Install-Module VMWare.PowerCLI -Scope CurrentUser
    • When prompted to trust the Repository, enter A for Yes to All
  • You can check the install by using the following command:
    • Get-Module VMWare.PowerCLI -ListAvailable

Testing connectivity from PowerShell to vCenter

  • Set to Ignore Invalid Certificate Warning
    • Set-PowerCLIConfiguration -InvalidCertificateAction Ignore
    • When prompted to update the configurations, enter A for Yes to All
  • Set to Ignore the CIEP
    • Set-PowerCLIConfiguration -ParticipateInCeip $false -Scope User
    • When prompted to update the configurations, enter A for Yes to All
  • Connect to vCenter
    • Connect-VIServer -Server vcenter.brianna.local
    • When prompted, enter the credentials for vCenter
  • Now vCenter is connected and can access the VMs