Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » Remove-PSDrive

Remove-PSDrive - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Remove-PSDrive

Short description
Deletes temporary Windows PowerShell drives and disconnects mapped network drives.

Syntax
Remove-PSDrive [-Name] <String[]> [-Force] [-PSProvider <String[]>] [-Scope <String>] [-Confirm] [-WhatIf] [-UseTransac
tion [<SwitchParameter>]] [<CommonParameters>]
Remove-PSDrive [-LiteralName] <String[]> [-Force] [-PSProvider <String[]>] [-Scope <String>] [-Confirm] [-WhatIf] [-Use
Transaction [<SwitchParameter>]] [<CommonParameters>]





Description
The Remove-PSDrive cmdlet deletes temporary Windows PowerShell drives that were created by using the New-PSDrive cmdlet
.


Beginning in Windows PowerShell 3.0, Remove-PSDrive also disconnects mapped network drives, including, but not limited 
to, drives created by using the Persist parameter of New-PSDrive.


Remove-PSDrive cannot delete Windows physical or logical drives.


Beginning in Windows PowerShell 3.0, when an external drive is connected to the computer, Windows PowerShell automatica
lly adds a PSDrive to the file system that represents the new drive. You do not need to restart Windows PowerShell. Sim
ilarly, when an external drive is disconnected from the computer, Windows PowerShell automatically deletes the PSDrive 
that represents the removed drive.