What is the difference between running @powershell and powershell (any command with @ at the front)?

Solution 1:

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 command echo 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 @:

If you want to turn echo off and you do not want to echo the echo command, type an at sign (@) before the command as follows:

@echo off

Turns out someone asked about this a year ago on StackOverflow as well:

  • What is the at sign (@) in a batch file and what does it do?