简体   繁体   English

无需连接到vCenter的powercli访问VM

[英]powercli access VMs without connecting to a vCenter

I need to write a PowerCLI script that gets an argument with a name of a virtual machine, and returns the VM's host name. 我需要编写一个PowerCLI脚本,该脚本获取带有虚拟机名称的参数,并返回VM的主机名。 The catch is, I shouldn't connect to the VC. 问题是,我不应该连接到VC。

thanks for all your help (: 感谢你的帮助 (:

PS: do any of you guys know how to connect the PowerCLI to the active directory? PS:你们中有人知道如何将PowerCLI连接到活动目录吗? That'll help me in other scripts I need to make. 这将帮助我完成其他需要编写的脚本。

Thank you! 谢谢! (: (:

This is not possible. 这是不可能的。

You would either need to authenticate with vCenter or with the ESXi host. 您可能需要通过vCenter或ESXi主机进行身份验证。

It is not possible to pull VM information without authentication as this would be quite a large security risk. 未经身份验证就无法提取VM信息,因为这将带来很大的安全风险。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM