Ok, I've identified it seemed to be caused by an invalid character "+" in the vApp name I created, as it's from a timestamp.
Once I removed this character all go well.
But, it seems ok to use this special character if I create new vApp in web page.
So it seems something not right in the PowerCLI to retrive vApp object if its name contains special character?
Did you try placing the name, with the special character, in single quotes?Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
It doesn't include the double quotes in the vApp name actually, I just use it to indicate the character here.
No, I mean the complete name, including the + sign, in single quotesBlog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
Do you mean like this?
$vAppName = 'myVApp+2018-2-28'
New-CIVApp -Name $vAppName -Description "This vApp is created from PowerCLI" -OrgVdc $orgVDC -VAppTemplate $vAppTempl
Same problem with using double quote: $vAppName = "myVApp+2018-2-28"
Yes, but it doesn't seem to help.
I suggest to open a SR, looks indeed like a PowerCLI issue.Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz