Why is wget no longer an alias for Invoke-WebRequest?

Copper Contributor

It seems that, at some point, [at least Windows PowerShell  5.1], PowerShell supported wget as an alias for Invoke-WebRequest. In newer versions [at least PowerShell (Core) 7.0], this is no longer the case.

When was it removed and what is the reason for the removal?

Output samples:

 

Windows PowerShell 5.1.17763.1007

 

PS C:\> gal wget

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           wget -> Invoke-WebRequest


PS C:\> gal -Definition Invoke-WebRequest

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           curl -> Invoke-WebRequest
Alias           iwr -> Invoke-WebRequest
Alias           wget -> Invoke-WebRequest

 

PowerShell (Core) 7.0.0

 

PS C:\> gal wget
Get-Alias: This command cannot find a matching alias because an alias with the name 'wget' does not exist.

PS C:\> gal -Definition Invoke-WebRequest

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           iwr -> Invoke-WebRequest

 

 

 

 

1 Reply

PowerShell Core is cross platform and wget already exist in Linux environments.

Wget is a free utility for non-interactive download of files from the Web. It supports HTTP , HTTPS , and FTP protocols, as well as retrieval through HTTP proxies.

 

Alias was removed to avoid any confusions when you are running PowerShell on Linux.

 

Reference: https://github.com/shyiko/jabba/issues/527

 

Hope that helps.