Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我连接到多个 VCenter,如何将 get-vm 命令用于特定 VCenter 而不是全部?
例如:我连接到 server1 和 server2
我想获取服务器 1 而不是服务器 2 中所有虚拟机的列表。
您可以将-Server开关用于Get-VM. IE
-Server
Get-VM
$server1 = Connect-VIServer server1 $server2 = Connect-VIServer server2 Get-VM -Server $server1 Get-VM -Server $server2