Directory

Remove-NetstorageDirectory

Synopsis

Delete a NetStorage directory.

Syntax

Remove-NetstorageDirectory [-Path] <String> [-DirectoryIsEmpty] [-Force] [-AuthFile <String>]
 [-Section <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

Deletes a NetStorage directory either by using the -DirectoryIsEmpty (rmdir) switch parameter to indicate that the directory is empty or by using the quick-delete feature if it's enabled on your NetStorage group. If using quick-delete, you can optionally provide the -Force switch to avoid receiving confirmation.

Note: You don't need to prepend paths with the upload directory CP Code, this is implied.

Parameters

-AuthFile

Location of your NetStorage auth file. Defaults to ~/.nsrc, but environment variables will take precedence.

Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DirectoryIsEmpty

Instructs PowerShell to use the rmdir action, which is only applicable if the target directory is empty.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Force

Do not prompt for confirmation before performing the delete.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Path

Path of your directory within the NetStorage group.

Type: String
Parameter Sets: (All)
Aliases: None
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Section

EdgeRC section to retrieve authentication credentials from. Defaults to default.

Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

System.Object

Related links