Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 236824

Re: Script to export virtual disk information in a specific format

$
0
0

It looks as if you are not using PowerShell v3.

In that version the problem with a foreach loop over an empty array has been fixed.

When there are no entries in the array, the code block will not be executed.

 

In PowerShell v2 you will have to check yourself in the script if Get-HardDisk returns anything.

 

I don't see how my solution will execute the first codeblock for a non-existing 2nd harddisk.

Perhaps you can attach the code you are using ?


Viewing all articles
Browse latest Browse all 236824

Trending Articles



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