Supplying an input file via ‘@’ gives an error: The splatting operator ‘@’ cannot be used to reference variables in an expression

Question:

Following this example here https://learn.microsoft.com/en-us/cli/azure/vm/run-command?view=azure-cli-latest

I’m getting an error when running my command

Error:

The splatting operator ‘@’ cannot be used to reference variables in an expression. ‘@script’ can be used only as an argument to a command. To reference variables in an expression use ‘$script’.

Putting it in quotes only passes in the contents in the quotes, not the contents of the script.

Answer:

if you install package whit @ you should install package whit CMD

Source:

Supplying an input file via ‘@’ gives an error: The splatting operator ‘@’ cannot be used to reference variables in an expression by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply