Skip to content

Windows Powershell へ PoserCLIインストール

インストール

Install-Module Vmware.PowerCLI
Get-ChildItem -Path  'C:\Program Files\WindowsPowerShell\Modules'  -Recurse | Unblock-File
Set-ExecutionPolicy RemoteSigned

ログ

事前確認

PS C:\WINDOWS\system32> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.3930
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.3930
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Install-Module VMware.PowerCLI
PS C:\WINDOWS\system32> Connect-VIServer -Server 192.168.0.100 -User [email protected] -Password 'xxxxxxxx' -f

Name                           Port  User
----                           ----  ----
192.168.0.100                 443   VSPHERE.LOCAL\Administrator


PS C:\WINDOWS\system32>

参考

https://t-dilemma.info/vsphere-cmd-powercli/
https://developer.vmware.com/docs/powercli/latest/products/vmwarevsphereandvsan/
https://blogs.vmware.com/vmware-japan/2021/02/tam-blog-powercli-01.html

PS C:\WINDOWS\system32> Install-Module VMware.PowerCLI

信頼されていないリポジトリからモジュールをインストールしようとしています。このリポジトリを信頼する場合は、Set-PSReposit
ory コマンドレットを実行して、リポジトリの InstallationPolicy の値を変更してください。'PSGallery'
からモジュールをインストールしますか?
[Y] はい(Y)  [A] すべて続行(A)  [N] いいえ(N)  [L] すべて無視(L)  [S] 中断(S)  [?] ヘルプ (既定値は "N"): A

PS C:\WINDOWS\system32> Get-ExecutionPolicy
Restricted
PS C:\WINDOWS\system32> Get-ChildItem -Path  'C:\Program Files\WindowsPowerShell\Modules'  -Recurse | Unblock-File
PS C:\WINDOWS\system32> Get-ChildItem -Path  'C:\Program Files\WindowsPowerShell\Modules'


    ディレクトリ: C:\Program Files\WindowsPowerShell\Modules


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        2023/07/19     11:01                Microsoft.PowerShell.Operation.Validation
d-----        2023/07/19     11:01                PackageManagement
d-----        2023/07/19     11:01                Pester
d-----        2023/07/19     11:01                PowerShellGet
d-----        2023/07/19     11:01                PSReadline
d-----        2024/01/23     13:22                VMware.CloudServices
d-----        2024/01/23     13:23                VMware.DeployAutomation
d-----        2024/01/23     13:23                VMware.ImageBuilder
d-----        2024/01/23     13:33                VMware.PowerCLI
d-----        2024/01/23     13:25                VMware.PowerCLI.Sdk
d-----        2024/01/23     13:25                VMware.PowerCLI.Sdk.Types
d-----        2024/01/23     13:25                VMware.PowerCLI.VCenter
d-----        2024/01/23     13:25                VMware.PowerCLI.VCenter.Types.ApplianceService
d-----        2024/01/23     13:25                VMware.PowerCLI.VCenter.Types.CertificateManagement
d-----        2024/01/23     13:30                VMware.Sdk.Nsx.Policy
d-----        2024/01/23     13:23                VMware.Sdk.Runtime
d-----        2024/01/23     13:30                VMware.Sdk.Srm
d-----        2024/01/23     13:32                VMware.Sdk.Vcf.CloudBuilder
d-----        2024/01/23     13:33                VMware.Sdk.Vcf.SddcManager
d-----        2024/01/23     13:30                VMware.Sdk.Vr
d-----        2024/01/23     13:25                VMware.Sdk.vSphere
d-----        2024/01/23     13:23                VMware.Sdk.vSphere.Appliance
d-----        2024/01/23     13:23                VMware.Sdk.vSphere.Appliance.Access
d-----        2024/01/23     13:23                VMware.Sdk.vSphere.Appliance.Health
d-----        2024/01/23     13:23                VMware.Sdk.vSphere.Appliance.InfraProfile
d-----        2024/01/23     13:23                VMware.Sdk.vSphere.Appliance.LocalAccounts
d-----        2024/01/23     13:23                VMware.Sdk.vSphere.Appliance.Logging
d-----        2024/01/23     13:23                VMware.Sdk.vSphere.Appliance.Networking
d-----        2024/01/23     13:23                VMware.Sdk.vSphere.Appliance.Recovery
d-----        2024/01/23     13:23                VMware.Sdk.vSphere.Appliance.SupportBundle
d-----        2024/01/23     13:23                VMware.Sdk.vSphere.Appliance.System
d-----        2024/01/23     13:23                VMware.Sdk.vSphere.Appliance.Update
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.Cis
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.Cis.Tagging
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.Content
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.ContentLibrary
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.Esx.Hcl
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.Esx.Hosts
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.Esx.Settings
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.VAPI.Metadata
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.Authentication
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.Authorization
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.CertManagement
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.ConsumptionDomains
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.Content
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.Datastore
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.Deployment
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.Guest
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.HVC
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.Identity
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.Inventory
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.ISO
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.LCM
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.NamespaceManagement
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.Namespaces
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.OVF
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.Services
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.Storage
d-----        2024/01/23     13:24                VMware.Sdk.vSphere.vCenter.SystemConfig
d-----        2024/01/23     13:25                VMware.Sdk.vSphere.vCenter.Tagging
d-----        2024/01/23     13:25                VMware.Sdk.vSphere.vCenter.Topology
d-----        2024/01/23     13:25                VMware.Sdk.vSphere.vCenter.TrustedInfrastructure
d-----        2024/01/23     13:25                VMware.Sdk.vSphere.vCenter.VCHA
d-----        2024/01/23     13:25                VMware.Sdk.vSphere.vCenter.Vm
d-----        2024/01/23     13:25                VMware.Sdk.vSphere.vCenter.VmTemplate
d-----        2024/01/23     13:25                VMware.Sdk.vSphere.vStats
d-----        2024/01/23     13:23                VMware.Sdk.vSphereRuntime
d-----        2024/01/23     13:22                VMware.Vim
d-----        2024/01/23     13:22                VMware.VimAutomation.Cis.Core
d-----        2024/01/23     13:23                VMware.VimAutomation.Cloud
d-----        2024/01/23     13:22                VMware.VimAutomation.Common
d-----        2024/01/23     13:22                VMware.VimAutomation.Core
d-----        2024/01/23     13:23                VMware.VimAutomation.Hcx
d-----        2024/01/23     13:23                VMware.VimAutomation.HorizonView
d-----        2024/01/23     13:22                VMware.VimAutomation.License
d-----        2024/01/23     13:23                VMware.VimAutomation.Nsxt
d-----        2024/01/23     13:22                VMware.VimAutomation.Sdk
d-----        2024/01/23     13:23                VMware.VimAutomation.Security
d-----        2024/01/23     13:22                VMware.VimAutomation.Srm
d-----        2024/01/23     13:22                VMware.VimAutomation.Storage
d-----        2024/01/23     13:23                VMware.VimAutomation.StorageUtility
d-----        2024/01/23     13:22                VMware.VimAutomation.Vds
d-----        2024/01/23     13:22                VMware.VimAutomation.Vmc
d-----        2024/01/23     13:23                VMware.VimAutomation.vROps
d-----        2024/01/23     13:23                VMware.VimAutomation.WorkloadManagement
d-----        2024/01/23     13:23                VMware.VumAutomation

参考

広告

Amazon : VMware vSphere7インテグレーションガイド

メルカリ:vSphere7 インテグレーションガイド