2012-09-26 2 views
0

누구나 PowerCLI에서 하이퍼 바이저의 도메인 설정을 얻는 방법을 알고 있습니까? 서버가있는 도메인의 이름을 얻고 싶지만 VM웨어 문서 (https://www.vmware.com/support/developer/vc-sdk/)를 살펴보면 검색 방법을 볼 수 없습니다. . API 버전 4.1 이상을 대상으로합니다.VMware PowerCLI에서 도메인 설정 검색

의견을 보내 주시면 감사하겠습니다.

답변

0

powerCLI에서이 작업을 수행하지 못했습니다. 일부 객체의 기본 유형이 무엇인지 쉽게 알 수 없었기 때문에 생각합니다. 그러나 동일한 방법으로 작동해야하는 VIM API를 통해이를 얻을 수있는 방법을 찾았습니다.

IHostAuthenticationManager hostAuthenticationManager = _hostSystem.Client.GetView(_hostSystem.ConfigManager.AuthenticationManager, null); 
HostActiveDirectoryInfo activeDirectorySettings = hostAuthenticationManager.Info.AuthConfig.OfType<HostActiveDirectoryInfo>().FirstOrDefault(); 

activeDirectorySettings.JoinedDomain // The name of the domain the hypervisor is connected to