Skip to content

Missing command alias: iwr #1778

Closed
Closed

Description

The iwr alias is missing in PowerShell Core, although Invoke-WebRequest works perfectly fine. Does this need to be added back?

  • Ubuntu 16.04 LTS base image (Dockerized)
  • .NET Core 1.0.0-preview2
  • PowerShell Core 6.0.0-alpha
PS /powershell> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
GitCommitId                    v6.0.0-alpha.8
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

image

Cheers,
Trevor Sullivan
Docker Captain
Microsoft MVP: Cloud & Data Center Management
https://trevorsullivan.net
https://twitter.com/pcgeek86

Activity

  1. jaapbrasser commented on Aug 15, 2016

    @jaapbrasser

    I ran a quick compare on the difference on the aliases:

    CommandType     Name                                               Version    Source                                                            
    -----------     ----                                               -------    ------                                                            
    Alias           asnp -> Add-PSSnapin                                                                                                            
    Alias           CFS -> ConvertFrom-String                          3.1.0.0    Microsoft.PowerShell.Utility                                      
    Alias           curl -> Invoke-WebRequest                                                                                                       
    Alias           epsn -> Export-PSSession                                                                                                        
    Alias           gcb -> Get-Clipboard                               3.1.0.0    Microsoft.PowerShell.Management                                   
    Alias           gsnp -> Get-PSSnapin                                                                                                            
    Alias           gwmi -> Get-WmiObject                                                                                                           
    Alias           ipsn -> Import-PSSession                                                                                                        
    Alias           irm -> Invoke-RestMethod                                                                                                        
    Alias           ise -> powershell_ise.exe                                                                                                       
    Alias           iwmi -> Invoke-WmiMethod                                                                                                        
    Alias           iwr -> Invoke-WebRequest                                                                                                        
    Alias           lp -> Out-Printer                                                                                                               
    Alias           npssc -> New-PSSessionConfigurationFile                                                                                         
    Alias           ogv -> Out-GridView                                                                                                             
    Alias           rsnp -> Remove-PSSnapin                                                                                                         
    Alias           rujb -> Resume-Job                                                                                                              
    Alias           rwmi -> Remove-WmiObject                                                                                                        
    Alias           scb -> Set-Clipboard                               3.1.0.0    Microsoft.PowerShell.Management                                   
    Alias           shcm -> Show-Command                                                                                                            
    Alias           sujb -> Suspend-Job                                                                                                             
    Alias           swmi -> Set-WmiInstance                                                                                                         
    Alias           trcm -> Trace-Command                                                                                                           
    Alias           wget -> Invoke-WebRequest                                                                                                       
    
    

    It seems multiple aliases have been removed. Perhaps this list could be reviewed and the relevant ones could be added back.

  2. rkeithhill commented on Aug 15, 2016

    @rkeithhill
    Collaborator

    Keep in mind that all of the *nix oriented alias have been removed in order to not conflict with the corresponding native utility. Ditto for the sort alias. IWR must have been an oversight??

  3. halr9000 commented on Aug 15, 2016

    @halr9000
    Contributor

    Yeah this means that all of us shell-first cross-platform people (like me)
    need to be careful about unintended effects. And of course, never ever use
    aliases in your scripts. That was important before, but now it's even more
    so.

    Some of the missing aliases are very obvious when you think about it. If
    one trips you up, I recommend a quick which [CMD], and you'll probably
    find there's a match in /bin or similar.

    On Mon, Aug 15, 2016, 12:02 PM Keith Hill notifications@github.com wrote:

    Keep in mind that all of the *nix oriented alias have been removed in
    order to not conflict with the native utility. Ditto for the sort alias.
    IWR must have been an oversight??

    —
    You are receiving this because you are subscribed to this thread.
    Reply to this email directly, view it on GitHub
    #1778 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe-auth/AABIMrN0D_g8eNMrZlm1qMmc3F8pWc82ks5qgI2ZgaJpZM4JjdhZ
    .

  4. added this to the milestone on Aug 17, 2016
  5. Francisco-Gamino commented on Feb 1, 2017

    @Francisco-Gamino
    Contributor

    Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Issue-BugIssue has been identified as a bug in the productWG-DevEx-Portabilityauthoring cross-platform or cross-architecture modules, cmdlets, and scripts

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions