What does @() mean in Powershell?

powershell

Solution

The `@` indicates an array. `@()` simply creates an empty array. I.e. this snippet:

$TodaysMail = @()

Would yield a variable `TodaysMail` representing an empty array.

Problem

I've seen this a few times in Powershell, and was curious what it meant : ``` @() ``` For example, in this block : ``` [datetime]$StartDate = ([datetime]::now.ToShortDateString()) $TodaysMail = @() ``` thanks !

Original source

Related problems