jlinc's Posts

PowerCLI Version ----------------    VMware vSphere PowerCLI 5.1 Release 1 build 793510 --------------- Snapin Versions ---------------    VMWare AutoDeploy PowerCLI Component 5.1 build 768... See more...
PowerCLI Version ----------------    VMware vSphere PowerCLI 5.1 Release 1 build 793510 --------------- Snapin Versions ---------------    VMWare AutoDeploy PowerCLI Component 5.1 build 768137    VMWare ImageBuilder PowerCLI Component 5.1 build 768137    VMware License PowerCLI Component 5.1 build 669840    VMware vSphere PowerCLI Component 5.1 build 793489
Unfortunately the column still returns blank.
For each VM, idealy, one column would should how how big the hard drive is, and how much space is being used by that drive. E.G.: VM Datacenter Cluster Hard Disk Datastore VMConfigFi... See more...
For each VM, idealy, one column would should how how big the hard drive is, and how much space is being used by that drive. E.G.: VM Datacenter Cluster Hard Disk Datastore VMConfigFile VMDKpath VMDK Size Drive Size Data1 DC1 C1 Hard disk 1 DS2 [DS2] ....vmx [DS2] ....vmdk 18.29669 40 Data1 DC1 C1 Hard disk 2 SS1 [SS1] ....vmx [SS1] ....vmdk 18.30292 60 Data2 DC2 C2 Hard disk 1 SS1 [SS1] ....vmx [SS1] ....vmdk 18.37966 40 Again, I appreciate your help!
Thanks for the quick reply. So far I am not able to get this added to the script in this thread though. Not sure what I'm doing wrong. $VmInfo = ForEach ($Datacenter in (Get-Datacenter | So... See more...
Thanks for the quick reply. So far I am not able to get this added to the script in this thread though. Not sure what I'm doing wrong. $VmInfo = ForEach ($Datacenter in (Get-Datacenter | Sort-Object -Property Name)) {   ForEach ($Cluster in ($Datacenter | Get-Cluster | Sort-Object -Property Name)) {     ForEach ($VM in ($Cluster | Get-VM | Sort-Object -Property Name)) {       ForEach ($HardDisk in ($VM | Get-HardDisk | Sort-Object -Property Name)) {         "" | Select-Object -Property @{N="VM";E={$VM.Name}},           @{N="Datacenter";E={$Datacenter.name}},           @{N="Cluster";E={$Cluster.Name}},           @{N="Hard Disk";E={$HardDisk.Name}},           @{N="Datastore";E={$HardDisk.FileName.Split("]")[0].TrimStart("[")}},           @{N="VMConfigFile";E={$VM.ExtensionData.Config.Files.VmPathName}},           @{N="VMDKpath";E={$HardDisk.FileName}},           @{N="VMDK Size";E={($vm.extensiondata.layoutex.file|?{$_.name -contains $harddisk.filename.replace(".","-flat.")}).size/1GB}},       }     }   } } $VmInfo | Export-Csv -NoTypeInformation -UseCulture -Path "C:\VmInfo4.csv"
Hello everyone, I'm having a hard time trying to get this script do what I want it to do. I'd like to just add a column that shows the provisioned space for each drive. Currently the "VMD... See more...
Hello everyone, I'm having a hard time trying to get this script do what I want it to do. I'd like to just add a column that shows the provisioned space for each drive. Currently the "VMDK Size" column will show the amount of space actually being used, but would like to output the provisioned size of the drive as well.  I'm a little new at this, I appreciate any help. Any thoughts? Thanks,