Hi,
I a creating a script that needs to do the following thing.
I us Sapien Powershell 2017 Editor for this because it has a form with info on it
check if a TAG exists (GET-TAG)
$TagInfo = Get-Tag -Name $paramClassName .
This works perfect. I get the info of the TAG if it exists and a $null if the TAG does not exist.
if the TAG does not exist, creat it.
$MyClassTAG = Get-TagCategory -name "Class" | New-Tag -name $paramClassName -Verbose -Debug -Confirm:$false
The TAG is created but the script does not continue, it stays in the NEW-TAG cmdlet...
with the VERBOSE option I get following output
VERBOSE: 07/01/2018 22:43:01 New-Tag Started execution
VERBOSE: Create tag 'ECCS-Classroom-GERTGERT-1' in category 'Class'
VERBOSE: 07/01/2018 22:43:01 New-Tag Started execution
VERBOSE: Create tag 'MyTAG' in category 'Class'
The next command, writing a sttus update in a text filed is never executed. if I comment out the NEW-TAG command line, the status is written correctly
Working with lates vCenter 6.5 and ESXi, on a windows 10 machine with latest PowerCLI modules installed.
PowerCLI Version
----------------
VMware PowerCLI 6.5.1 build 5377412
---------------
Component Versions
---------------
VMware Cis Core PowerCLI Component 6.5 build 6983166
VMware VimAutomation Core PowerCLI Component 6.5 build 6234650
Can someone tell me what I am doing wrong?
Thanks
Gert