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 }
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With