Get-PSDrive

 

Additional Resources for Get-PSDrive

 

Listing Your Windows PowerShell Drives

http://www.microsoft.com/technet/scriptcenter/topics/msh/cmdlets/get-psdrive.mspx

 

 

SYNOPSIS

Gets information about Windows PowerShell drives.

 

SYNTAX

Get-PSDrive [[-name] <string[]>] [-pSProvider <string[]>] [-scope <string>] [<CommonParameters>]

 

Get-PSDrive [-literalName] <string[]> [-pSProvider <string[]>] [-scope <string>] [<CommonParameters>]

 

DETAILED DESCRIPTION

Gets information about Windows PowerShell drives. If no drive is specified it gets information for all Windows PowerShell drives in the current namespace scope.

 

PARAMETERS

 

-name <string[]>

Specifies the name of the Windows PowerShell drive about which to retrieve information. To specify multiple Windows PowerShell drives, separate them by using commas.

 

Required?

false

Position?

1

Default value

*

Accept pipeline input?  

true (ByPropertyName)

Accept wildcard characters? 

true

 

-pSProvider <string[]>

This parameter returns the PSDriveInfo object for all of the drives exposed by the specified provider(s).

 

Required?

false

Position?

named

Default value

*

Accept pipeline input?  

true (ByPropertyName)

Accept wildcard characters? 

true

 

-scope <string>

Specifies the scope within which to search for the specified Windows PowerShell drive.

 

Required?

false

Position?

named

Default value

String.empty

Accept pipeline input?  

true (ByPropertyName)

Accept wildcard characters? 

false

 

-literalName <string[]>

Specifies the new of the item. The value of LiteralName is used exactly as it is typed. No characters are interpreted as wildcards. If the name includes escape characters, enclose it in single quotation marks. Single quotation marks tell Windows PowerShell not to interpret any characters as escape sequences.

 

Required?

true

Position?

1

Default value

 

Accept pipeline input?  

true (ByPropertyName)

Accept wildcard characters? 

false

 

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, type, "get-help about_commonparameters".

 

INPUT TYPE

String or pipelined object

 

RETURN TYPE

A PSDriveInfo object.

 

NOTES

 

For more information, type "Get-Help Get-PSDrive -detailed". For technical information, type "Get-Help Get-PSDrive -full".

 

When specifying multiple values for a parameter, use commas to separate the values. For example, "<parameter-name> <value1>, <value2>".

 

EXAMPLE 1

 

get-psdrive

 

This command displays information about all currently visible drives.

 

EXAMPLE 2

 

get-psdrive HK*

 

This command displays information about drives with names that begin with the letters HK. By default, the result will be information about drives mapped to the registry provider.

 

RELATED LINKS

New-PSDrive

Remove-PSDrive

Get-Help

Get-Command

Get-Member