Remove-PSDrive

Remove a Windows PowerShell drive from its location (rdr).

Syntax
      Remove-PSDrive { [[-name] string[]] | [-literalName] string[]  }
[-pSProvider string[]] [-scope string] [-force] [-whatIf] [-confirm] [CommonParameters] Key -name string[] The PowerShell drive name(s), separate multiple names with commas. -literalName string[] The Drive name which will be used exactly as typed. No characters are interpreted as wildcards. If the name includes escape characters, enclose it in single quotation marks. -pSProvider Remove all of the drives exposed by the specified PowerShell provider. e.g. FileSystem, Registry or Certificate. -scope The scope within which to search for the specified PowerShell drive. -force Override restrictions that prevent the command from succeeding, apart from security settings. e.g. -force will override a files read-only attribute, but will not change file permissions. -whatIf Describe what would happen if you executed the command without actually executing the command. -confirm Prompt for confirmation before executing the command. CommonParameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutVariable.

Examples

Remove a PowerShell drive named S:

PS C:\>remove-psdrive -name s

"Peace is not the absence of war; it is a virtue; a state of mind; a disposition for benevolence,confidence, and justice" - Baruch Spinoza

Related:

Get-PSDrive - Get drive information (DriveInfo)
New-PSDrive - Install a new drive on the machine
Get-Command - Retrieve basic information about a command
Get-Member - Enumerate the properties of an object
Get-Help - Open the help file
Equivalent bash command: umount(8) - detach/unmount a device



Back to the Top

© Copyright SS64.com 1999-2010
Some rights reserved