< Back

DisMount-LongShare

Sun Jan 19, 2020 5:58 pm

NAME DisMount-LongShare



SYNOPSIS







SYNTAX

DisMount-LongShare [-DriveLetter] <String> [-Force <SwitchParameter>] [<CommonParameters>]





DESCRIPTION

Remove a mapped drive





PARAMETERS

-DriveLetter <String>

The name of a local device to be disconnected, such as "F:".

Note: you may omit the ':' in the drive letter, e.g. F



Required? true

Position? 0

Default value

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-Force [<SwitchParameter>]

Specifies whether the disconnection should occur if there are open files or jobs on the connection.

If this parameter is false or not specified, the function fails if there are open files or jobs

Warning: this may result in loss of unsaved changed so use with care.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String







OUTPUTS

none







-------------------------- EXAMPLE 1 --------------------------



PS C:\\>DisMount-LongShare -DriveLetter F:



Unmounts any network share that is mounted on F:

-------------------------- EXAMPLE 2 --------------------------



PS C:\\>DisMount-LongShare -DriveLetter G -Force



Any open files or connections to the G drive are dropped and then the G drive is unmounted .



RELATED LINKS