Just installed Chocolatey and in their installation instructions they have
@powershell -NoProfile -ExecutionPolicy unrestricted......
I tried to run @cls
in my console and it worked too.
It's amazing to find something new in this space after so many years in the industry.
What difference @
makes?
Best Answer
The most recognizable instance of this is probably
@echo off
at the beginning of batch files (since DOS).@
turns off console echo of that command. You see it in@echo off
all the time because if you don't use it, you'll see the actual commandecho off
in the console display when the batch is run. Which is counter-productive when you're trying to control what's displayed/echoed in your batch script. :)Having said that, I'm not sure why the Chocolaty website says to use it in that (non-batch) context.
Here's Microsoft's TechNet article on Echo, which explains the
@
:Turns out someone asked about this a year ago on StackOverflow as well: