Install-Directory

Creates a directory, if it doesn't exist.

Syntax

Install-Directory [-Path] <String> [<CommonParameters>]

Description

The Install-Directory function creates a directory. If the directory already exists, it does nothing. If any parent directories don't exist, they are created, too.

Install-Directory was added in Carbon 2.1.0.

Parameters

Name Type Description Required? Pipeline Input Default Value
Path String

The path to the directory to create.

true false

EXAMPLE 1

Install-Directory -Path 'C:\Projects\Carbon'

Demonstrates how to use create a directory. In this case, the directories C:\Projects and C:\Projects\Carbon will be created if they don't exist.