java_doctor_101
java_doctor_101

Reputation: 3357

What does the ">" symbol mean in PowerShell

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

Answers (1)

Ken White
Ken White

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

Related Questions