Skip to content

Instantly share code, notes, and snippets.

@sdorsett
Created July 17, 2018 22:36
Show Gist options
  • Save sdorsett/838dee3e66056c2183d727cbf60d3fd4 to your computer and use it in GitHub Desktop.
Save sdorsett/838dee3e66056c2183d727cbf60d3fd4 to your computer and use it in GitHub Desktop.
install powershell & powercli on Centos 7
### install powershell:
curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo
sudo yum install -y powershell
pwsh
### install powercli:
Set-PSRepository -Name "PSGallery" -InstallationPolicy "Trusted"
Find-Module "VMware.PowerCLI" | Install-Module -Scope "CurrentUser" -AllowClobber
Import-Module "VMware.PowerCLI"
Set-PowerCLIConfiguration -InvalidCertificateAction ignore -confirm:$false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment