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

Skip the null variable

$
0
0

Hi

I have a script to create a new hard disk for the VM

How to modify my script to skip the the harddisk creation if the hardisk1 cell does not have a value(empty)!

 

$harddisk1 = $Data.harddisk1
$DatastoreName1 = $Data.DatastoreName1

$Name | New-HardDisk -CapacityGB $harddisk1 -Datastore $DatastoreName1 -Persistence persistent

 

Capture.PNG


Viewing all articles
Browse latest Browse all 180259

Trending Articles



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