23 lines
483 B
PowerShell
23 lines
483 B
PowerShell
function Get-LocalHardDriveRoots {
|
|
<#
|
|
.SYNOPSIS
|
|
Get the local hard drive filesystem roots for this computer
|
|
|
|
.PARAMETER IncludeRemovableDisks
|
|
Get the IDs of removable disks as well
|
|
|
|
.OUTPUTS
|
|
Returns a [string[]] of drive letters.
|
|
|
|
.EXAMPLE
|
|
> Get-LocalHardDriveRoots
|
|
C:,D:,E:
|
|
#>
|
|
[CmdletBinding()]
|
|
[OutputType([string[]])]
|
|
param (
|
|
$IncludeRemovableDisks
|
|
)
|
|
|
|
return @((Get-LocalHardDrives -IncludeRemovableDisks:$IncludeRemovableDisks).DeviceID)
|
|
} |