Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the ">" symbol mean in PowerShell

Tags:

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  }
like image 466
java_doctor_101 Avatar asked Oct 27 '25 15:10

java_doctor_101


1 Answers

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.

like image 122
Ken White Avatar answered Oct 29 '25 06:10

Ken White



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!