Virtualization is a technology that creates virtual versions of computer hardware such as servers, storage, and networks. This allows multiple operating systems to run on one physical machine, increasing flexibility and resource utilization. It's widely used in data centers and cloud computing to increase efficiency and scalability. Types include server, storage, and network virtualization. Server virtualization creates virtual versions of physical servers known as VMs which can run their own OS
October 13, 2018
Get Virtual Machines provisioned Disk size for a list of VMs
Below is a script to get VM provisioned Disk size from list of VMs in a .txt file
you will be getting Total provisioned Disk size for each VM in the list and output will be save to a CSV file
#Get Virtual Machines Disk size for a list
$vmList = Get-Content D:\temp\inputFile.txt
$results= foreach ($vmName in $vmList) {Get-VM $vmName | Select-Object Name,@{n="HardDiskSizeGB"; e={(Get-HardDisk -VM $_ | Measure-Object -Sum CapacityGB).Sum}}}
$results | Export-Csv "D:\temp\file.csv"
Redirecting to a CSV file
| Export-Csv "D:\temp\file.csv
Invoke lines from a text file to Power CLI
$vmList = Get-Content D:\temp\inputFile.txt
Subscribe to:
Post Comments (Atom)
-
Today while working I engage with below error when trying to add a Virtual Media to UCS Server "cisco virtual media redirection is ...
-
Recovery Key Alarm This is A new alarm which triggered to prompt the administrator to back up the recovery key. https://docs.vmware.c...
-
Today I was working on my Test environment i got this issue - I was trying to ssh form one Esxi to another and I got below error FIPS...
No comments:
Post a Comment