< Back

Get-LongFreeDriveLetter

Sun Jan 19, 2020 5:59 pm

NAME Get-LongFreeDriveLetter



SYNOPSIS

List free or available drive letters on the local machine



Get-LongFreeDriveLetter [-Last] [<CommonParameters>]





SYNTAX

Get-LongFreeDriveLetter [<CommonParameters>]



Get-LongFreeDriveLetter [-Last <SwitchParameter>] [<CommonParameters>]





DESCRIPTION

By default this cmdlet gets the first available drive letter.





PARAMETERS

-Last [<SwitchParameter>]

When true get the last available drive letter.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None







OUTPUTS

System.Object







-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-LongFreeDriveLetter -Verbose

VERBOSE: Get-LongFreeDriveLetter: Listing the first free DriveLetter

G





-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-LongFreeDriveLetter -Last -Verbose

VERBOSE: Get-LongFreeDriveLetter: Listing the Last free DriveLetter

Z







RELATED LINKS