From a previous post:
“$notes2 works for the ‘Notes2’ column in the same way that $notes works for the ‘Notes’ column. I’m not quite sure what you mean when you say “$notes2 just outputted 2”.”
I have this issue too. I’m doing a Local Command to ‘Create’ or ‘Delete’ a vSphere snapshot.
cmd /c echo . |powershell -executionpolicy bypass -file C:\Downloads\Scripts\vSphereSnapOrDelete.ps1 $computer $notes2
Notes2 column has either a 0 or 1 (representing delete or create). In my script I capture each variable to confirm input. The variable for $computer is correct but the variable for $notes2 is not. Example: I have entered ‘1’ in Notes2. when I execute the BP Local command above, that variable reports ’02’
Sample output:
Computer = 10.233.75.76 — Notes2 = 02
Now, if I switch command to $note instead of $notes2 the variable is reported correctly.
As another test, I typed in Notes2 column the word Off.
my script/command returns “12”
10.233.75.76 — 12
It’s only $notes2, all others work correctly: $description, $location, $category, $notes