[iyunv@sydnagios psl-omi-provider]# pwsh
PowerShell v6.1.0-preview.1
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/pscore6-docs
Type 'help' to get help.
PS /tmp/psl-omi-provider> $PSVersionTable
Name Value
---- -----
PSVersion 6.1.0-preview.1
PSEdition Core
GitCommitId v6.1.0-preview.1
OS Linux 3.10.0-514.10.2.el7.x86_64 #1 SMP Fri Mar 3 00:04:05 UTC 2017
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
然后在Powershell core的控制台下直接安装Vmware PowerCli core就行了
PS /tmp/psl-omi-provider> Install-Module -Name Vmware.PowerCli 安装完毕之后确认一下 就可以执行相关命令了
PS /tmp/psl-omi-provider> Connect-VIServer sydvcs2012
WARNING: Please consider joining the VMware Customer Experience Improvement Program, so you can help us make PowerCLI a better product. You can join using the following command:
Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $true
VMware's Customer Experience Improvement Program ("CEIP") provides VMware with information that enables VMware to improve its products and services, to fix problems, and to advise you on how best to deploy and use our products. As part of the CEIP, VMware collects technical information about your organization�s use of VMware products and services on a regular basis in association with your organization�s VMware license key(s). This information does not personally> 测试一下命令,输出某个主机当前的内存状态,成功
PS /tmp/psl-omi-provider> get-vmhost sydesx5.omnicom.com.au | get-stat -Realtime -MaxSamples 1 -memory MetricId Timestamp Value Unit Instance -------- --------- ----- ---- -------- mem.usage.average 9/04/18 1:57:40 pm 52.15 %
mem.active.average 9/04/18 1:57:40 pm 6190728 KB
mem.vmmemctl.average 9/04/18 1:57:40 pm 0 KB
mem.granted.average 9/04/18 1:57:40 pm 75877672 KB