ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Comparing PowerShell to Linux User Manipulation

    IT Discussion
    7
    82
    1.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller @Obsolesce
      last edited by

      @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

      @JaredBusch said in Comparing PowerShell to Linux User Manipulation:

      @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

      Create a New Local User
      New-LocalUser salty #PowerShell - super simple, automatically prompts for password
      useradd sally #BASH - simple
      passwd p@ssw0rd #BASH - simple, insecure

      WTF? Insecure? Are you fucking stupid?

      Also the correct syntax is passwd salty and guess what, it prompts you to enter the password.

      How about that, it is not any different between the two systems.

      Shit yeah I did know that.

      Still, it's two commands, versus one with PowerShell, unless you write a long one-liner in BASH.

      Yes, still two commands. Although the PS one is interactive. Which still sucks, too. In this case, PS is slightly better, I feel, but net user beats either.

      1 Reply Last reply Reply Quote 0
      • ObsolesceO
        Obsolesce
        last edited by

        Screenshot_20190421-180851_ReadEra.jpg

        1 Reply Last reply Reply Quote 0
        • ObsolesceO
          Obsolesce
          last edited by

          Screenshot_20190421-182000_ReadEra.jpg

          1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller
            last edited by

            Understood, Windows is basically crazy complex and non-standard even within itself and needs special tooling to get to where Linux is out of the box 😉 The simple answer is, the best tooling in the world will never fix the underlying complexities baked into the Windows product line and PowerShell is an attempt to make the best of a less than ideal situation. Whereas on Linux the approach has been to take a standard approach whenever possible allowing generic tools to be elegant and effective.

            ObsolesceO 1 Reply Last reply Reply Quote 1
            • scottalanmillerS
              scottalanmiller
              last edited by

              Objects certainly have advantages, but text has some whopping advantages, too. Like "what you see is real" rather than "what you see is a representation." It's amazing how much power not abstracting the basic configuration away from the admin provides. Yes, it can make getting specific output parsed a little harder in some cases, but means that the data provided is always parsable. Windows relies on special tools for every task, and if those tools aren't made or have issues, tough. With text interfaces, those problems don't really exist.

              1 Reply Last reply Reply Quote 0
              • ObsolesceO
                Obsolesce @scottalanmiller
                last edited by

                @scottalanmiller said in Comparing PowerShell to Linux User Manipulation:

                Understood, Windows is basically crazy complex and non-standard even within itself and needs special tooling to get to where Linux is out of the box 😉 The simple answer is, the best tooling in the world will never fix the underlying complexities baked into the Windows product line and PowerShell is an attempt to make the best of a less than ideal situation. Whereas on Linux the approach has been to take a standard approach whenever possible allowing generic tools to be elegant and effective.

                Exactly.

                scottalanmillerS 1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @Obsolesce
                  last edited by

                  @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

                  @scottalanmiller said in Comparing PowerShell to Linux User Manipulation:

                  Understood, Windows is basically crazy complex and non-standard even within itself and needs special tooling to get to where Linux is out of the box 😉 The simple answer is, the best tooling in the world will never fix the underlying complexities baked into the Windows product line and PowerShell is an attempt to make the best of a less than ideal situation. Whereas on Linux the approach has been to take a standard approach whenever possible allowing generic tools to be elegant and effective.

                  Exactly.

                  This is why comparing PowerShell to CMD is kind of useful, but comparing to BASH is much lessso. When people look at them, then tend to use PowerShell for Windows tasks and BASH for non-Windows tasks. Which makes sense for usage, but no one is actually comparing PS and BASH, they are comparing Windows and Linux tasks.

                  PS on Linux works the same as on Windows, but isn't very efficient. It can do essentially anything BASH can do, but is generally slower and more difficult. But on Windows, BASH does haven't the interfaces that PS has, so what it does it does really well, but what it doesn't do is pretty big.

                  ObsolesceO 1 Reply Last reply Reply Quote 0
                  • ObsolesceO
                    Obsolesce @scottalanmiller
                    last edited by Obsolesce

                    @scottalanmiller said in Comparing PowerShell to Linux User Manipulation:

                    This is why comparing PowerShell to CMD is kind of useful, but comparing to BASH is much lessso.

                    This is why I said from the beginning it's not apples to apples between PoSh and Bash.

                    scottalanmillerS 1 Reply Last reply Reply Quote 0
                    • scottalanmillerS
                      scottalanmiller @Obsolesce
                      last edited by

                      @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

                      This is why I said from the beginning it's not apples to apples between PoSh and Bash.

                      It can be, though. Because there are times where the shells themselves are what we are comparing. And the discussion I had been having originally, was purely about the shells. Things like startup times and reaction times, for which PS is extremely slow compared to Bash. When you put them into an apples to apples mode, just using them to do things like a remote connection or to run a command, PS is extremely slow. When we are comparing their functionality, they are used for generally very different things. But there are absolutely, like what we were initially discussing, when they are identical and the underlying performance differences are very visible.

                      1 Reply Last reply Reply Quote 0
                      • F
                        flaxking
                        last edited by

                        As far as I know, robocopy is still the best file copying/syncing utility included in Windows, and you have to parse the output to get any anything useful back to work with in Powershell.

                        ^ another example of Windows administration mismatch

                        scottalanmillerS 1 Reply Last reply Reply Quote 1
                        • scottalanmillerS
                          scottalanmiller @flaxking
                          last edited by

                          @flaxking said in Comparing PowerShell to Linux User Manipulation:

                          As far as I know, robocopy is still the best file copying/syncing utility included in Windows, and you have to parse the output to get any anything useful back to work with in Powershell.

                          ^ another example of Windows administration mismatch

                          Interesting, so it outputs in text, not objects? Robocopy is definitely the best, never realized that PS didn't fully integrate.

                          ObsolesceO 1 Reply Last reply Reply Quote 0
                          • ObsolesceO
                            Obsolesce @scottalanmiller
                            last edited by

                            @scottalanmiller said in Comparing PowerShell to Linux User Manipulation:

                            @flaxking said in Comparing PowerShell to Linux User Manipulation:

                            As far as I know, robocopy is still the best file copying/syncing utility included in Windows, and you have to parse the output to get any anything useful back to work with in Powershell.

                            ^ another example of Windows administration mismatch

                            Interesting, so it outputs in text, not objects? Robocopy is definitely the best, never realized that PS didn't fully integrate.

                            Robocopy isn't PowerShell or a PowerShell cmdlet, function, or module. AFAIK, that's where you get to work with objects.

                            However, you can really easily parse the output of Robocopy and turn it into a really nice and usable object 🙂

                            scottalanmillerS 1 Reply Last reply Reply Quote 0
                            • scottalanmillerS
                              scottalanmiller @Obsolesce
                              last edited by

                              @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

                              Robocopy isn't PowerShell or a PowerShell cmdlet, function, or module. AFAIK, that's where you get to work with objects.

                              But wasn't the point that PS was needed to do those things because that is how "Windows" works? If PS only does those things because that is how PS works, then PS is total garbage. It doesn't matter that it isn't part of PS, it's part of Windows, hence should follow the Windows rules.

                              ObsolesceO 1 Reply Last reply Reply Quote 0
                              • scottalanmillerS
                                scottalanmiller
                                last edited by

                                And, likewise, if it is part of Windows, then it is PowerShell's job to interact with it effectively.

                                1 Reply Last reply Reply Quote 0
                                • ObsolesceO
                                  Obsolesce @scottalanmiller
                                  last edited by

                                  @scottalanmiller said in Comparing PowerShell to Linux User Manipulation:

                                  @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

                                  Robocopy isn't PowerShell or a PowerShell cmdlet, function, or module. AFAIK, that's where you get to work with objects.

                                  But wasn't the point that PS was needed to do those things because that is how "Windows" works? If PS only does those things because that is how PS works, then PS is total garbage. It doesn't matter that it isn't part of PS, it's part of Windows, hence should follow the Windows rules.

                                  Maybe you didn't understand.

                                  Robocopy isn't Windows.

                                  Robocopy works great from PowerShell, but Robocopy itself is it's own separate tool in which all logging is text based. It's not at all the same as working with Windows API or an app like Excel...

                                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                                  • ObsolesceO
                                    Obsolesce
                                    last edited by

                                    PowerShell has its own way to work with files built in, even though Robocopy is easier to use.

                                    scottalanmillerS 1 Reply Last reply Reply Quote 0
                                    • scottalanmillerS
                                      scottalanmiller @Obsolesce
                                      last edited by

                                      @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

                                      Maybe you didn't understand.
                                      Robocopy isn't Windows.

                                      It is. Robocopy is part of Windows, and a very important part of it. Far moreso part of Windows than say rsync is part of RHEL. Robocopy is made by Microsoft and part of the base of what makes Windows Windows. It is the same or more a part of Windows than PowerShell is.

                                      ObsolesceO 1 Reply Last reply Reply Quote 0
                                      • scottalanmillerS
                                        scottalanmiller @Obsolesce
                                        last edited by

                                        @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

                                        PowerShell has its own way to work with files built in, even though Robocopy is easier to use.

                                        That's good that PS has that, but PS is also there to be a part of the Windows ecosystem, not an alternative to it. And PS doesn't really have its own, does it? It's that there are separate tools and PS just works better with those other tools, that likely aren't as good as Robocopy.

                                        Anything in a CmdLet isn't PowerShell, it's another app, just like RoboCopy is. Just one built more with PS being the calling shell in mind, instead of being a more general part of Windows like RoboCopy.

                                        1 Reply Last reply Reply Quote 0
                                        • ObsolesceO
                                          Obsolesce @scottalanmiller
                                          last edited by

                                          @scottalanmiller said in Comparing PowerShell to Linux User Manipulation:

                                          @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

                                          Maybe you didn't understand.
                                          Robocopy isn't Windows.

                                          It is. Robocopy is part of Windows, and a very important part of it. Far moreso part of Windows than say rsync is part of RHEL. Robocopy is made by Microsoft and part of the base of what makes Windows Windows. It is the same or more a part of Windows than PowerShell is.

                                          Robocopy used to not even be included in Windows. Windows was still Windows without Robocopy.

                                          scottalanmillerS 1 Reply Last reply Reply Quote 0
                                          • scottalanmillerS
                                            scottalanmiller @Obsolesce
                                            last edited by

                                            @Obsolesce said in Comparing PowerShell to Linux User Manipulation:

                                            Robocopy used to not even be included in Windows. Windows was still Windows without Robocopy.

                                            WAS, but IS not. Everything in Windows, including the kernel, didn't used to be there. All of it is new at some point, but together now, that is what Windows is. If you consider Windows only what was included in the original release of Windows NT 3.1, then PowerShell isn't in Windows or even a Windows application as it won't run there.

                                            Robocopy is Windows as much as anything can be Windows. There is nothing today that can be considered "more Windows" than it. Many things are equally Windows, like NTKernel and CMD. Some things you could argue like Notepad are slightly less Windows because they are in the GUI install only, but I'd not think that that makes a lot of sense. But Robocopy is part of every Windows for a long time, and in every configuration.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 4 / 5
                                            • First post
                                              Last post