Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 2.0 » Get-PSDrive

Get-PSDrive - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.

Get-PSDrive


Short description
Gets the Windows PowerShell drives in the current session.

Syntax
Get-PSDrive [-LiteralName] <string[]> [-PSProvider <string[]>] [-Scope <string>] [-UseTransaction] [<CommonParamete
rs>]

Get-PSDrive [[-Name] <string[]>] [-PSProvider <string[]>] [-Scope <string>] [-UseTransaction] [<CommonParameters>]

Description
The Get-PSDrive cmdlet gets the Windows PowerShell drives in the current session. You can get a particular drive or
 all drives in the console.

Get-PSDrive gets the following drives:

-- Windows logical drives on the computer, including drives mapped to network shares. 

-- Drives exposed by Windows PowerShell providers (such as the Certificate:, Function:, and Alias: drives) and the 
HKLM: and HKCU: drives that are exposed by the Windows PowerShell Registry provider. 

-- Drives that you create by using New-PSDrive.

Get-PSDrive does not get Windows mapped drives that are added or created after the Windows PowerShell console is op
ened.