Skip to content

Clear SdnWorkingDirectory

Adam Rudell edited this page Mar 23, 2023 · 4 revisions

Clear-SdnWorkingDirectory

SYNOPSIS

Clears the contents of the directory specified

SYNTAX

Local (Default)

Clear-SdnWorkingDirectory [-Path <String[]>] [-Recurse] [-Force] [<CommonParameters>]

Remote

Clear-SdnWorkingDirectory [-Path <String[]>] [-Recurse] [-Force] -ComputerName <String[]>
 [-Credential <PSCredential>] [<CommonParameters>]

DESCRIPTION

{{ Fill in the Description }}

EXAMPLES

EXAMPLE 1

Clear-SdnWorkingDirectory

EXAMPLE 2

Clear-SdnWorkingDirectory -ComputerName PREFIX-NC01 -Path 'C:\Temp\SDN2'

EXAMPLE 3

Clear-SdnWorkingDirectory -ComputerName PREFIX-NC01,PREFIX-SLB01 -Credential (Get-Credential)

EXAMPLE 4

Clear-SdnWorkingDirectory -Force -Recurse

EXAMPLE 5

Clear-SdnWorkingDirectory -Path 'C:\Temp\SDN1','C:\Temp\SDN2' -Force -Recurse

PARAMETERS

-Path

Specifies a path of the items being removed. Wildcard characters are permitted. If ommitted, defaults to (Get-WorkingDirectory).

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: (Get-WorkingDirectory)
Accept pipeline input: False
Accept wildcard characters: False

-Recurse

Indicates that this cmdlet deletes the items in the specified locations and in all child items of the locations.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Force

Forces the cmdlet to remove items that cannot otherwise be changed, such as hidden or read-only files or read-only aliases or variables.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ComputerName

Type the NetBIOS name, an IP address, or a fully qualified domain name of one or more remote computers.

Type: String[]
Parameter Sets: Remote
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credential

Specifies a user account that has permission to perform this action. The default is the current user. Type a user name, such as User01 or Domain01\User01, or enter a PSCredential object generated by the Get-Credential cmdlet. If you type a user name, you're prompted to enter the password.

Type: PSCredential
Parameter Sets: Remote
Aliases:

Required: False
Position: Named
Default value: [System.Management.Automation.PSCredential]::Empty
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

OUTPUTS

NOTES

RELATED LINKS

Documentation

How To Guides:

Troubleshooting Guides

Learning

Functions

Clone this wiki locally