ps/Modules/Cole.PowerShell.Developer/Public/Get-LocalHardDriveRoots.ps1

23 lines
483 B
PowerShell
Raw Permalink Normal View History

2023-05-30 22:51:22 -07:00
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)
}