PowerShell을 사용하여 지정된 사용자에 대한 기본 vSphere 인벤토리 보기를 가져오는 방법 - PowerCLI
요약: PowerCLI를 활용하여 지정된 사용자 이름에 대해 표시되는 vSphere 기본 인벤토리를 확인하는 작은 스크립트입니다. 이 방법은 사용자가 vCenter UI에 로그인하여 데이터를 수동으로 수집하는 대신 사용할 수 있습니다.
이 문서는 다음에 적용됩니다.
이 문서는 다음에 적용되지 않습니다.
이 문서는 특정 제품과 관련이 없습니다.
모든 제품 버전이 이 문서에 나와 있는 것은 아닙니다.
지침
이 KB 문서의 첨부된 스크립트를 다운로드하고 PowerCLI가 설치된 관리 시스템에서 .zip 패키지의 압축을 풉니다.
참고: 이 스크립트는 데이터 저장소, VM(Virtual Machine) 이름 및 네트워크 정보를 인쇄하도록 추가로 개선될 수 있으며, 초기 범위를 벗어나더라도 .csv 형식으로 내보내려는 경우에 사용할 수 있습니다.
스크립트 매개변수 옵션:
PS C:\inventory> .\GetUserInventory.ps1 -vcenter dvcsa-w1.dubai.ad -vcuser administrator@vsphere.local -vcpassword "xxxxx” [Mandatory] -vcenter <ip or fqdn of the targeted vCenter> [Mandatory] -vcuser <username to test/list inventory of the targeted vCenter> [Optional] -vcpassword <password of the -vcuser, if not used the script will prompt interactively for password> [Optional] -detail <if used the script will print Datacenters, Clusters and hosts names>
예상 출력에 대한 참조 예:
PS C:\inventory> .\GetUserInventory.ps1 -vcenter dvcsa-w1.dubai.ad -vcuser administrator@vsphere.local -vcpassword "xxxxx”
∞ Connecting to provided vcenter dvcsa-w1.dubai.ad
∞
√ Connected to:
√
√ VCName VCVersion
√ ------ ---------
√ dvcsa-w1.dubai.ad 6.7.0
√
√
∞
∞ Inventory Listing
∞
√ + dvcsa-w1.dubai.ad :
√
√ DataCenters Clusters Hosts VM DataStores VDS PortGroups
√ ----------- -------- ----- -- ---------- --- ----------
√ 2 5 15 6 9 5 10
√
√
∞
√ All done.
detail 옵션을 사용한 예:
PS C:\inventory> .\GetUserInventory.ps1 -vcenter dvcsa-w1.dubai.ad -vcuser administrator@vsphere.local -vcpassword “xxxxx” -detail
∞ Connecting to provided vcenter dvcsa-w1.dubai.ad
∞
√ Connected to:
√
√ VCName VCVersion
√ ------ ---------
√ dvcsa-w1.dubai.ad 6.7.0
√
√
∞
∞ Inventory Listing
∞
√ + dvcsa-w1.dubai.ad :
√
√ DataCenters Clusters Hosts VM DataStores VDS PortGroups
√ ----------- -------- ----- -- ---------- --- ----------
√ 2 5 15 6 9 5 10
√
√
∞
∞ - W1-Datacenter
∞
∞ - Cluster-A
∞ - w1-cla-n01.dubai.ad
∞ - w1-cla-n02.dubai.ad
∞ - w1-cla-n03.dubai.ad
∞
∞ - Cluster-B
∞ - w1-clb-n01.dubai.ad
∞ - w1-clb-n02.dubai.ad
∞ - w1-clb-n03.dubai.ad
∞
∞ - Cluster-C
∞ - w1-clc-n01.dubai.ad
∞ - w1-clc-n02.dubai.ad
∞ - w1-clc-n03.dubai.ad
∞
∞ - W2-Datacenter
∞
∞ - Cluster-D
∞ - w1-cld-n01.dubai.ad
∞ - w1-cld-n02.dubai.ad
∞ - w1-cld-n03.dubai.ad
∞
∞ - Cluster-E
∞ - w1-cle-n01.dubai.ad
∞ - w1-cle-n02.dubai.ad
∞ - w1-cle-n03.dubai.ad
∞
√ All done.
추가 정보
PowerCLI 설치 방법에 대한 지침은 https://developer.broadcom.com/powercli/installation-guide 참조하십시오.
이는 고객과 지원 담당자가 일반적인 작업을 실행할 수 있도록 도와주는 간단한 스크립트 예제입니다. 스크립팅에 대한 공식적인 Dell 기술 지원은 없습니다.
해당 제품
VMware ESXi 7.x, VMware ESXi 8.x문서 속성
문서 번호: 000196742
문서 유형: How To
마지막 수정 시간: 13 5월 2026
버전: 4
다른 Dell 사용자에게 질문에 대한 답변 찾기
지원 서비스
디바이스에 지원 서비스가 적용되는지 확인하십시오.