PowerShell will actually treat any comma-separated list as an array:
"server1","server2"
So the @ is optional in those cases. However, for associative arrays, the @ is required:
@{"Key"="Value";"Key2"="Value2"}
Officially, @ is the “array operator.” You can read more about it in the documentation that installed along with PowerShell, or in a book like “Windows PowerShell: TFM,” which I co-authored.
Related Posts:
- How do you comment out code in PowerShell?
- How do I pass multiple parameters into a function in PowerShell?
- What does “while True” mean in Python?
- What’s the meaning of “=>” (an arrow formed from equals & greater than) in JavaScript?
- How do I break a string in YAML over multiple lines?
- What is the difference between {} and [] in python?
- What does ‘&’ do in a C++ declaration?
- Tab space in Markdown
- In JavaScript is != same as !==
- syntaxerror: “unexpected character after line continuation character in python” math
- How do you express binary literals in Python?
- What Does This Mean in PHP -> or =>
- Comments in Markdown
- Can someone explain __all__ in Python?
- How to exit a loop in Python?
- How can I do a line break (line continuation) in Python?
- Comments in Markdown
- What does the /= operator mean in Python?
- What is the difference between syntax and semantics in programming languages?
- What do << or >>> in java mean?
- What is the Java ?: operator called and what does it do?
- What do >> and << mean in Python?
- PowerShell string interpolation syntax
- Is there a difference between `continue` and `pass` in a for loop in python?
- How do I convert a float number to a whole number in JavaScript?
- hat does “static” mean in C?
- What does `<>` mean in Python?
- Ternary operator (?:) in Bash
- What does the “at” (@) symbol do in Python?
- What is :: (double colon) in Python when subscripting sequences?
- Is there a difference between x++ and ++x in java?
- What’s the u prefix in a Python string?
- Static Semantics meaning?
- What does the `and` keyword mean in OCaml?
- text highlight in markdown
- Python def function: How do you specify the end of the function?
- No Multiline Lambda in Python: Why not?
- What does @@variable mean in Ruby?
- How do you format an unsigned long long int using printf?
- What are those pipe symbols for in Ruby?
- Prolog “or” operator, query
- PowerShell says “execution of scripts is disabled on this system.”
- Is double square brackets [[ ]] preferable over single square brackets [ ] in Bash?
- What does operator “dot” (.) mean?
- Running a command as Administrator using PowerShell?
- syntaxerror: “unexpected character after line continuation character in python” math
- How to concatenate string variables in Bash
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- Echo equivalent in PowerShell for script testing
- JavaScript: SyntaxError: missing ) after argument list
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- PowerShell says “execution of scripts is disabled on this system.”
- How to use the curl command in PowerShell?
- How to split string by string in Powershell
- How to split string by string in Powershell
- -bash: syntax error near unexpected token `newline’
- Downloading a file with PowerShell
- Terminating a script in PowerShell
- How to run an EXE file in PowerShell with parameters with spaces and quotes
- what is the meaning of == sign?
- Terminating a script in PowerShell
- -bash: syntax error near unexpected token `newline’ for display command
- How do I concatenate strings and variables in PowerShell?
- Are multi-line strings allowed in JSON?
- Nested JSON objects – do I have to use arrays for everything?
- PowerShell and the -contains operator
- SyntaxError: Unexpected Identifier in Chrome’s Javascript console
- How do you pass a function as a parameter in C?
- How to normalize a 2-dimensional numpy array in python less verbose?
- What is the difference between ‘/’ and ‘//’ when used for division?
- What’s the syntax for declaring an array of function pointers without using a separate typedef?
- Azure Powershell Select-AzureSubscription with subscription id
- You cannot call a method on a null-valued expression
- What are the distinctions between the various symbols (*,&, etc) combined with parameters?
- Unix tail equivalent command in Windows Powershell
- Bash syntax error: unexpected end of file
- How to print environment variables to the console in PowerShell?
- Printing variables in Python 3.4
- How to assign multiple lines string in Powershell Console
- How to run PowerShell in CMD
- Error “‘type’ object has no attribute ‘__getitem__'” when iterating over list[“a”,”b”,”c”]
- Call PowerShell script PS1 from another PS1 script inside Powershell ISE
- Java syntax explanation – getMenuInflater()
- Convert a string to datetime in PowerShell
- Running Python in PowerShell?
- Best way to “negate” an instanceof
- LDAP query in PowerShell
- Inline for loop
- accessing the $args array in powershell
- What does ‘wb’ mean in this code, using Python?
- Create a function with optional call variables
- What does the & symbol in powershell mean?
- How to enter a multi-line command
- Get file version in PowerShell
- One Powershell Script calling another with parameters
- Concatenate files using PowerShell
- bash: syntax error near unexpected token `(‘ – Python
- Powershell send-mailmessage – email to multiple recipients
- Sometimes PowerShell stops sending output until I press enter. Why?
- In a PowerShell script, how can I check if I’m running with administrator privileges?