1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

News Microsoft open-sources PowerShell

Discussion in 'Article Discussion' started by Gareth Halfacree, 19 Aug 2016.

  1. Gareth Halfacree

    Gareth Halfacree WIIGII! Lover of bit-tech Administrator Super Moderator Moderator

    Joined:
    4 Dec 2007
    Posts:
    17,129
    Likes Received:
    6,717
  2. Omnislip

    Omnislip Minimodder

    Joined:
    31 May 2011
    Posts:
    637
    Likes Received:
    158
    So why on earth would you use PowerShell when the Bash shell is now available in Windows?
     
  3. schmidtbag

    schmidtbag What's a Dremel?

    Joined:
    30 Jul 2010
    Posts:
    1,082
    Likes Received:
    10
    Yeah I never quite understood that either. The way I see it, Microsoft implemented this as a way to help Linux [server] users transition to Windows. However, it can easily work the other way around.
     
  4. Corky42

    Corky42 Where's walle?

    Joined:
    30 Oct 2012
    Posts:
    9,648
    Likes Received:
    388
    I've never understood why Microsoft didn't just improve the command prompt, I'm probably missing some technically reason though.
     
  5. schmidtbag

    schmidtbag What's a Dremel?

    Joined:
    30 Jul 2010
    Posts:
    1,082
    Likes Received:
    10
    I've always wondered the same thing. Even in Linux, you can access different shells within the same terminal window or TTY. For example, you can switch between sh, bash, zsh, and so on. I don't see that as being any different than using the classic DOS command prompt vs PowerShell in a cmd window for Windows.
     
  6. dyzophoria

    dyzophoria Minimodder

    Joined:
    3 May 2004
    Posts:
    393
    Likes Received:
    1
    most probably for backward purposes, a lot of old school stuff (programs) that use thecomamnd prompt that might just break if they started modifying the environment.
     
  7. dyzophoria

    dyzophoria Minimodder

    Joined:
    3 May 2004
    Posts:
    393
    Likes Received:
    1
    I think the issue is how command prompt was designed. command prompt today is practically an emulation of the old days of command prompt from DOS (pre-NT kernel) and correct me if I'm wrong there wasn't that much of a kernel to connect to before. The design of the linux kernel though is very different, that might be the reason as well as how it easy it is for MS to bring bash to windows, and powershell to linux. maybe.
     
  8. Corky42

    Corky42 Where's walle?

    Joined:
    30 Oct 2012
    Posts:
    9,648
    Likes Received:
    388
    I wasn't saying they should drop the command prompt dyzophoria, quiet the opposite, i was wondering why they didn't just improve, develop, or whatever, the command prompt to support what powershell does, it seems Microsoft has a habit of developing something better instead of just making what they already have better, instead of building on what's already there they seem to come out with new things and leave the old stuff by the wayside.
     
  9. theshadow2001

    theshadow2001 [DELETE] means [DELETE]

    Joined:
    3 May 2012
    Posts:
    5,284
    Likes Received:
    183
    As dyz said it's probably down to the design and implementation of command prompt. Everything from the language to the architecture most likely didn't suit the requirements of powershell. Also trying to improve command prompt to the point that it is essentially powershell is probably difficult without breaking backwards compatibility. Programmers also like to start things from scratch.
     
  10. jb0

    jb0 Minimodder

    Joined:
    8 Apr 2012
    Posts:
    555
    Likes Received:
    93
    Back-compatibility. They have companies running .bat files that are twenty-five years old and refuse to update them. CMD.EXE behavior needs to be stable to avoid breakage.

    Hence, PowerShell. It doesn't need to be back-compatible with every bizarre quirk, or even the basic functionality. It gave them a chance to rebuild from the ground up, beholden to no existing standard or expectation.


    Basically because Windows doesn't have a concept of a terminal the way the Unix-descended OSes do. You don't have cmd.exe running on top of a session inside a terminal emulator. The entire window itself IS cmd.exe So you'd have one application completely transferring ownership of its window to another technically-unrelated application.

    That said, such mechanisms have existed for as long as Windows has had a DOS prompt, so you CAN change shells on a whim. If you are running cmd.exe and type powershell, PS DOES take over the window until you type exit. And vice-versa.
     

Share This Page