PowerShell: Image-uploader

 

Today continue to share with you the automated scripts to upload ovf image to Vcenter

I implemented this function and sub-function using  the following scripts(although there are some duplicate functions call, this will be improved using the same function calls across the entire scripts ):

  1. Using condition to avoid repeatedly calling and loading VMware modules, using condition to avoid repeatedly inputting the Vcenter host, username and password settings, using condition to escape related condition. Know how to add more conditions to “if-else” sentence to determine whether or not to execute the related scripts
  2. [string]::IsNullOrWhitespace($Datastore) to determine whether string is null or contains whitespace
  3. Using Powershell built-in Import-VApp, Get-VMHost to upload ovf to VCenter server or get related information

 

To be continued…

 

One thought on “PowerShell: Image-uploader

Leave a Reply

Your email address will not be published. Required fields are marked *