Export (0) Print
Expand All

Get-AvailableDriveLetter

Windows Server 2012 R2 and Windows 8.1

Updated: July 8, 2013

Applies To: Windows Server 2012 R2 Preview

Get-AvailableDriveLetter

Returns an array of the available drive letters.

Syntax

Parameter Set: Default
Get-AvailableDriveLetter [-ReturnFirstLetterOnly] [ <CommonParameters>]




Detailed Description

Returns an array of all available drive letters, or optionally only the first available drive letter.

Parameters

-ReturnFirstLetterOnly

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

Outputs

The output type is the type of the objects that the cmdlet emits.

  • System.String

    This cmdlet outputs an array of strings that stores the available drive letters.


Examples

Example 1 – Get all available drive letters

PS C:\> Get-AvailableDriveLetter

Example 2 – Get the first available drive letter

PS C:\> Get-AvailableDriveLetter -ReturnFirstLetterOnly

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft