Reputation: 3357
Can someone explain what the >
symbol does in PowerShell scripting?
To be specific, I am looking at the following line:
New-Item $env:Passwords -ItemType Directory -Force > $null }
Upvotes: 4
Views: 3053
Reputation: 125679
That is the redirection operator, specifically for output. In this case, it redirects (sends) the output of New-Item
to the destination $null
- IOW, it suppresses it so there is no output.
You can see the help topic about_Redirection
, or for more general information Using command redirection at MSDN.
Upvotes: 5