PackageDeployment Module Help

Package Deployment Module

Disconnect-SmbShare Cmdlet

Version 4.0.0.5

Disconnect-SmbShare

Synopsis

Disconnects a connected network drive

Disconnect-SmbShare [-Drive] <String> [-SafeOnly] [[-Context] <String>] [-PreventUninstall] [-ContinueOnError] [<CommonParameters>]

Description

Disconnects a connected network drive.

Parameters

-Drive <String>

The drive letter of the drive to be disconnected.

Required

True

Position

1

Accepts pipeline input

False

-SafeOnly <SwitchParameter>

If specified, the drive will only be disconnected if no files are open on the drive anymore

Required

False

Position

Named

Accepts pipeline input

False

-Context <String>

User: Execution under user account; logging in HKEY_CURRENT_USER, i.e. for the user.
UserPerService: User-related command, execution in Service context.
Computer: Execution under user account; logging in HKEY_CURRENT_MACHINE, i.e. for the computer.
ComputerPerService: Execution in service context; logging in HKEY_LOCAL_MACHINE, i.e. for the computer.

Required

False

Position

2

Accepts pipeline input

False

-PreventUninstall <SwitchParameter>

If used, the drive will not be disconnected during uninstall

Required

False

Position

Named

Accepts pipeline input

False

-ContinueOnError <SwitchParameter>

If switch is used the script won't abort if an error occurs

Required

False

Position

Named

Accepts pipeline input

False

<CommonParameters>

For more information about common parameters, type "Get-Help about_CommonParameters".