devops-collective-inc/unix-persons-guide-to-powershell

mkdir command is missing

Closed this issue · 0 comments

m8ram commented

The section "commands detail m" is missing the mkdir command.

mkdir exists as a function in Powershell and is a wrapper for the New-Item Cmdlet.

To use the New-Item Cmdlet directly use New-Item -ItemType directory -Path C:\Scripts\newDir.

Multiple directories can be created by passing a comma-separated list of paths.

There is no -p, --parents option to create parent directories as needed, New-Item will automatically create all parent directories as needed even if the -Confirm option is given.

There is also no -v, --verbose option, New-Item is always verbose and will print a directory listing of the newly created file.