I've seen the @ symbol used in PowerShell to initialise arrays.
@
What exactly does the @ symbol denote and where can I read more about it?
In PowerShell V2, @ is also the Splat operator.
PS> # First use it to create a hashtable of parameters: PS> $params = @{path = "c:emp"; Recurse= $true} PS> # Then use it to SPLAT the parameters - which is to say to expand a hash table PS> # into a set of command line parameters. PS> dir @params PS> # That was the equivalent of: PS> dir -Path c:emp -Recurse:$true
1.4m articles
1.4m replys
5 comments
57.0k users