What is the definition of "External Commands" ?

Welcome Forums General PowerShell Q&A What is the definition of "External Commands" ?

This topic contains 3 replies, has 3 voices, and was last updated by

 
Participant
8 months, 2 weeks ago.

  • Author
    Posts
  • #95118

    Participant
    Points: 1
    Rank: Member

    What is the definition of "External Commands" ?

    Is it everything other than cmdlets ? Or everything other than cmdlets, functions, worrkflows, etc = everything other than what is native to PowerShell itself – the list provided by the "Get-Command" cmdlet ?

  • #95121

    Participant
    Points: 227
    Helping Hand
    Rank: Participant

    Simply put.
    Any executable / console applications / command line interactive stuff – .exe, .com, etc...

    For example you can get the banned list of external commands directly form PoSH itself. Just by looking at the list provided by the variable below, but this really and PowerSHell_ISE thing. The console window below the ISE script pane is not the true PoSH console host. It is not designed for external interactive command line stuff. You can do it, but you have to know absolutely every parameter needed and you must type in inline, in the script pane or the ISE console.

    $psUnsupportedConsoleApplications
    
    wmic
    wmic.exe
    cmd
    cmd.exe
    diskpart
    diskpart.exe
    edit.com
    netsh
    netsh.exe
    nslookup
    nslookup.exe
    powershell
    powershell.exe
    
    These are the defaults. You can add more.
    As a rule, if you really need to use these types of things. Stick with the true PoSH console host (powershell.exe). 
    
  • #95130

    Participant
    Points: 0
    Rank: Member

    Simpler to think of it as "if its not powershell its an external command"

    The online help at https://docs.microsoft.com/en-gb/powershell/module/Microsoft.PowerShell.Core/Get-Command?view=powershell-5.1
    gives a list of PowerShell command types

    • #95139

      Participant
      Points: 1
      Rank: Member

      So the answer to my original question:

      Or everything other than cmdlets, functions, worrkflows, etc = everything other than what is native to PowerShell itself – the list provided by the "Get-Command" cmdlet ?

      =

      "YES"

The topic ‘What is the definition of "External Commands" ?’ is closed to new replies.