Is there a way to use mkdir (aka md) in powershell without verbose output? Currently, the output is as follows:
PS C:\Users\myusername> mkdir foobar
Directory: C:\Users\myusername
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 2016-12-07 9:35 AM foobar
PS C:\Users\myusername>
Unless there's an error to report, I'd like it to be silent, as in
PS C:\Users\myusername> mkdir foobar
PS C:\Users\myusername>
Is there a way to do this? I'm using Powershell version 2.
| Out-Null
?mkdir | out-null
,mkdir > $null
,$null = mkdir
,[void]mkdir
are your options, I always use> $null
because it's faster than| out-null
- see this for reference stackoverflow.com/questions/5260125/…