Windows PowerShell vs Cmd.exe.md - Juan-bit94/Ops401D10 GitHub Wiki

Windows PowerShell vs Cmd.exe

Learning the difference

  • We don't want to confuse PowerShell.exe with cmd.exe. PowerShell is not the same thing as the 64-bit command processor; they are separate executables.
  • Now if you have some experience with Windows shell scripting, then you've come to use a bunch of what is called compiled executables. Example
    • ipconfig
    • ping
    • dnscmd
    • netsh
  • These old command line utilities are ones that run in cmd.exe., cmd.exe is an executable program file that exists under C:\Windows\System32. Its also called DOS prompt. MS-DOS is an operating system that has been a part of Windows for many years.
  • Cmd is a host or allows you to run other command line complied executables (see example of compiled executables).
  • Old command line utilities have a nonstandard syntax, if you have experience with UNIX/Linux then you will know exactly what is being referenced. All the command line tools have separate learning curve, a separate set of parameters and switches.
  • You wind up having to reinvent the wheel so to speak every time you learn a new command line utility.

Contrast with PowerShell

  • Windows PowerShell has a consistent syntax and usage regardless of what you are doing. If you're doing TCP/IP configuration, it's the same cmdlet structure. So once you learn how cmdlet structure works, how parameters work, and how the Windows pipeline functions, you can apply those skills to whatever you're doing in Windows PowerShell.
  • Its extremally useful, Windows PowerShell is infinitely preferable to using those old tools.
  • Additionally, another thing is that the PowerShell becomes so intimately associated with the .NET Framework, gives you programming powers if you need it.