PowerShell: Create Directory

By Xah Lee. Date: .

Create New Directory

mkdir dirName

Note: mkdir is a builtin function, not a Cmdlet , not alias.

Full syntax to make a directory:

New-Item dirName -ItemType directory
# dirName can be name or full path

Hide the output:

mkdir dirName | out-null

out-null suppress the useless info about the fact you created a directory.

More efficient way to hide output:

$null = mkdir dirName

PowerShell, Working with Directory

PowerShell

Practical How-To

list files

list dirs

on dir

on file

Windows config

zip tar

misc


PowerShell in Depth

Programing PowerShell

Value Types

String

Variable

Boolean

Conditional

Data Structure

Loop and Iteration

Input/Output

Function

Profile and Script

Script Examples