Zend certified PHP/Magento developer

Windows tar extract returns Unrecognized archive format but WSL extracts

I have downloaded a file with IDM.

When I run tar xvf file.gz in powershell, I get this error:

tar.exe: Error opening archive: Unrecognized archive format

I also am sure regarding file have been downloaded completely with no corrupt.

But when I run tar xvf file.gz in the same path via WSL, it works fine and extracts.

I also check it with file file.gz in WSL and it is shows as a gz compressed file.

I run these commands in terminal and shows it’s gz:

Add-Type -AssemblyName "System.Web"
GetMimeMapping
[System.Web.MimeMapping]::GetMimeMapping(".file.gz")

Since I’m using a Python script to get a file and extract that, I need it works fine in powershell.