Get-YTdlpExecutable

SYNOPSIS

Finds the yt-dlp executable

SYNTAX

Get-YTdlpExecutable [[-Path] <String>] [-ErrorIfMissing] [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

DESCRIPTION

The Get-YTdlpExecutable function finds the yt-dlp executable. If a path is supplied it is validated, otherwise the PATH is searched & on Windows the default winget locations are checked as well because a freshly installed winget package is not always on the PATH of the current session.

EXAMPLES

EXAMPLE 1

Get-YTdlpExecutable

Returns the full path to yt-dlp or nothing if yt-dlp is not installed

EXAMPLE 2

Get-YTdlpExecutable -ErrorIfMissing

Returns the full path to yt-dlp or throws an error if yt-dlp is not installed

PARAMETERS

-Path

Defines an explicit path to the yt-dlp executable

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ErrorIfMissing

Throws an error instead of returning nothing when the executable is not found

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

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

INPUTS

N/A

OUTPUTS

System.String

NOTES

Copyright 1990-2026 Celerium

NAME: Get-YTdlpExecutable Type: Private

AUTHOR:  David Schulte
DATE:    2025-11-11
EMAIL:   celerium@Celerium.org

TODO:

https://github.com/Celerium/Celerium.YTdlp