Assert-Directory¶
SYNOPSIS¶
Ensures that a directory is valid
SYNTAX¶
DESCRIPTION¶
Checks the given path to ensure it both exists and is a valid directory
EXAMPLES¶
Example 1¶
Would return no error
Example 2¶
Would return an error as the file is not a directory
PARAMETERS¶
-Path¶
The path to be checked
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters¶
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.