Passing arguments with escape characters to a batch file from PowerShell prompt

Öze*_* B. 1 powershell batch-file

I have a batch file which runs a Python package, and it takes a string argument to run. The string, usually a Youtube link, has assignment symbols (=) so the argument must be enclosed in quotation marks to work properly. And it does work fine when I call it from command prompt like so (the file's path is set in environment variables so it can be called directly with its name):

script-name "https://www.youtube.com/playlist?list=PLZlA0Gpn_vH_CthENcPCM0Dww6a5XYC7f"
Run Code Online (Sandbox Code Playgroud)

This command works fine on CMD prompt, as I said, but on PowerShell everything after = symbol is discarded. How can I get this batch file to work properly in PowerShell prompt, which is my go to terminal?

script-name.bat file itself looks like this:

youtube-dl -r 1500K -o "D:\Downloads\Youtube Videos\%%(playlist)s\%%(autonumber)02d - %%(title)s.%%(ext)s" %1
Run Code Online (Sandbox Code Playgroud)

Edit: The command and output clearly shows how the rest of the link is discarded:

PS C:\WINDOWS\system32> dl-playlist "https://www.youtube.com/playlist?list=PLZlA0Gpn_vH_CthENcPCM0Dww6a5XYC7f"

C:\WINDOWS\system32>youtube-dl -r 1500K -o "D:\Downloads\Youtube Videos\%(playlist)s\%(autonumber)02d - (ext)s" https://www.youtube.com/playlist?list
Run Code Online (Sandbox Code Playgroud)

Jos*_*efZ 6

在 PowerShell 中,按如下方式转义双引号:

dl-playlist "`"https://www.youtube.com/playlist?list=PLZlA0Gpn_vH_CthENcPCM0Dww6a5XYC7f`""
Run Code Online (Sandbox Code Playgroud)

或者

dl-playlist '"https://www.youtube.com/playlist?list=PLZlA0Gpn_vH_CthENcPCM0Dww6a5XYC7f"'
Run Code Online (Sandbox Code Playgroud)

或者

dl-playlist `""https://www.youtube.com/playlist?list=PLZlA0Gpn_vH_CthENcPCM0Dww6a5XYC7f"`"
Run Code Online (Sandbox Code Playgroud)

甚至

dl-playlist """https://www.youtube.com/playlist?list=PLZlA0Gpn_vH_CthENcPCM0Dww6a5XYC7f"""
Run Code Online (Sandbox Code Playgroud)