lib/poshy-env-var.0.5.0/src/Get-EnvPathItem.ps1
#!/usr/bin/env pwsh $ErrorActionPreference = "Stop" Set-StrictMode -Version Latest function Get-EnvPathItem() { [CmdletBinding(DefaultParameterSetName = "ProcessScopeForValue")] param( [Parameter(Mandatory=$true, ParameterSetName="MachineScopeForValue", Position=0)] [switch] $Machine, [Parameter(Mandatory=$true, ParameterSetName="ProcessScopeForValue", Position=0)] [switch] $Process, [Parameter(Mandatory=$true, ParameterSetName="UserScopeForValue", Position=0)] [switch] $User, [Parameter(Mandatory=$true, ParameterSetName="ScopeValueForValue", Position=0)] [System.EnvironmentVariableTarget] $Scope ) $new_args = $PSBoundParameters + @{Name="PATH"} Get-EnvVarPathItem @new_args } |