Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 175116

Problems With New PSObject For Audit Report

$
0
0

   Hi All,

 

I'm attempting to write a script that will gather information about the VMs in a vCenter environment, namely Name, vCPUs, Memory, Operating System, and, the kicker, disk information (specifically, capacity and free space).  The script is attached, with many parts borrowed.

 

Now, typically, I would use the New-Object -TypeName PSObject -Property @{ }, but I couldn't find any way to use any sort of logic (i.e. a ForEach loop within this), and this is required.  For some reason, the columns for vCPU, MemoryGB, and GuestOS are blank.  Also, it's transposing the two disks, swapping the C:\ and E:\ drives (attached as well).  The Name works, but has been blanked out to protect the innocent.

 

Thank you, in advance, for any help!


Viewing all articles
Browse latest Browse all 175116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>