Author Posts

March 4, 2018 at 6:30 am

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 ?

March 4, 2018 at 8:21 am

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). 

March 4, 2018 at 11:19 am

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

March 4, 2018 at 2:58 pm

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"