windows - Can we trap all commands and modify them before they are passed to powershell? -


i extend powershell supports wider range of commands including support running command matches executable name in system. know many of scripting guys implemented scripts running applications system's path or registry. example, similar idea here: http://www.codeproject.com/articles/224166/bash-like-prompt-in-powershell-and-app-run i'm asking more that. want type name of program , invoke program without typing (not alias of script)

roughly, add support for,

  • all run commands. example,

    ps > notepad++

    ps > chrome

i know 'start chrome' work. not applications work way. example, if chrome command add 'start ' before it. if command matched other executable. send & "\path\to\executable"

besides, want rid of start command. add following features,

  • some basic mathematical syntaxes supporting log, power, base conversion etc
  • some necessary tools (mathematics , other binary necessary executable binaries installed default)

it's 2015. command prompts , shells still dumb. therefore, shall write custom shell. before reinventing wheel ensure not possible using powershell extend commands.

i need access commands sent powershell execution , modify them before executed powershell.

regarding first case, launching executables, see answer here why happening , how can deal it.

as far other stuff, don't think it's possible add own operators, can write own functions of course. can use class/type/library can used in .net, including ones write yourself.

you can use add-type c# (or vb.net?) code in string add functionality. it's quite there's way things want in existing .net library somewhere, first.

powershell reqlly quite amazing , extensive, shells go because has full power of .net behind it.

maybe show [pseudo]code examples of how want proposed features work , post workarounds.