User Tools

Site Tools


sysadmin:installare_powercli

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

sysadmin:installare_powercli [ 7/05/2020 08:52] – created - external edit 127.0.0.1sysadmin:installare_powercli [ 2/02/2023 05:00] (current) – [Host connesso a Internet] lrosa
Line 1: Line 1:
 +====== Installare VMware PowerCLI ======
 +
 +È normale che installi NuGetProvider.
 +
 +=====Host connesso a Internet=====
 +<code powershell>
 +Find-Module -Name VMware.PowerCLI
 +Install-Module -Scope AllUsers -Name VMware.PowerCLI</code>
 +
 +Se dà un errore di downlod eseguire questo comando:
 +<code powershell>[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12</code>
 +=====Host non connesso a Internet=====
 +Da un host connesso a Internet:
 +<code powershell>
 +Find-Module -Name VMware.PowerCLI
 +Save-Module -Name VMware.PowerCLI -Path C:\dove\vuoi
 +</code>
 +''C:\dove\vuoi'' deve essere una dir vuota.
 +
 +Una volta scaricati i file, copiarli sul sistema sconnesso da Internet e su quel sistema digitare questo al prompt di PowerShell
 +<code powershell>$ENV:PSModulePath</code>
 +Copiare i file scaricati in uno dei path indicati.
 +
 +=====Settare le impostazioni di default=====
 +<code powershell>Set-PowerCLIConfiguration -Scope AllUsers -ParticipateInCeip $false -InvalidCertificateAction Ignore</code>
 +
 +=====Usare PowerCLI=====
 +<code powershell>Import-Module VMware.PowerCLI</code>
 +
 +=====Creare shortcut sul desktop=====
 +Creare uno shortcut con questo target:
 +
 +  C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noe -c "Import-Module VMware.PowerCLI"
 +
 +=====Aggiornare il modulo=====
 +<code powershell>Update-Module -Name VMware.PowerCLI</code>
 +
 +