Thanks for the response Dan. When I use “Name=$Name” then I get the return value also as Name=$Name
I am using %tokens because the ec2-create-tags command is called from a batch file by another powershell script that reads the user inputs with read-host variables.
Under “Any help would be appreciated” … get batch files completely out of the mix. You are creating unnecessary complications. Unless there is a TRULY compelling reason, it should be all PowerShell.
Thanks for the response Megamorf. I did exactly that by moving the code from batch files into the powershell script to eliminate the complexity. Also, I used the syntax in powershell as described in the command’s help that I was trying to execute.
If you’re using the command line tools on a Windows system, you might need to use quotation marks (for example, “key=value”). If you’re using Windows Powershell, you might need to use a second set of quotation marks, escaped with backticks (for example, “`"key=value`”").