Install PowerCli from PS 5.1 Shell


'Install-PowerCLI-2.ps1'
#Install DOTNet Framework 4.7.2 first
#Get DotNet Framework Install here and put in $ENV:USERPROFILE\downloads
#"https://support.microsoft.com/en-us/topic/microsoft-net-framework-4-7-2-offline-installer-for-windows-05a72734-2127-a15d-50cf-daf56d5faec2"
$url = "https://go.microsoft.com/fwlink/?linkid=863265"
$output = "$ENV:UserProfile\Downloads\dotnet-framework-installer.exe"

Invoke-WebRequest -Uri $url -OutFile $output

#>
. $ENV:USERPROFILE\downloads\\NDP472-KB4054530-x86-x64-AllOS-ENU.exe /q /norestart
'Wait for the task to finish - watch with tasklist'
'...and then run this'
'Install-module -force -Name VMware.PowerCLI -AllowClobber -SkipPublisherCheck -AcceptLicense -AllowPrerelease|Out-Null'
'Import-Module VMware.PowerCLI -PassThru -FORCE -Verbose|Out-null'
'Update-module VMware.PowerCLI -Force -Verbose -PassThru|Add-PSSnapin'

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.