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

    Managing Windows Local Users with PowerShell

    IT Discussion
    windows sam windows administration system administration windows administration powershell shell command line cli
    3
    14
    1.2k
    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 @WrCombs
      last edited by

      @WrCombs said in Managing Windows Local Users with PowerShell:

      @scottalanmiller said in Managing Windows Local Users with PowerShell:

      @WrCombs said in Managing Windows Local Users with PowerShell:

      Part of a series on WIndows Systems Administration by Scott Alan Miller

      Can we get a link to this?

      I've not put the ToC together yet. But the tag works.

      sweet - thanks.
      I have some interest in Windows Administration , Thanks

      Me too 🙂

      1 Reply Last reply Reply Quote 1
      • CloudKnightC
        CloudKnight
        last edited by

        so ugly compared to using bash in linux...I just hate the way powershell syntax is.

        WrCombsW 1 Reply Last reply Reply Quote 1
        • WrCombsW
          WrCombs @CloudKnight
          last edited by

          @StuartJordan said in Managing Windows Local Users with PowerShell:

          so ugly compared to using bash in linux...I just hate the way powershell syntax is.

          What does the syntax in linux "using bash" look like?

          CloudKnightC scottalanmillerS 2 Replies Last reply Reply Quote 0
          • CloudKnightC
            CloudKnight @WrCombs
            last edited by CloudKnight

            @WrCombs In regards to adding users on Linux..not adding Windows users.

            1 Reply Last reply Reply Quote 1
            • CloudKnightC
              CloudKnight
              last edited by

              even the net user command looks cleaner:

              "net localgroup administrators username /add"

              But yep, powershell is the future and that is now defunct....

              scottalanmillerS 1 Reply Last reply Reply Quote 3
              • CloudKnightC
                CloudKnight
                last edited by

                the only bonus, you do get tab completion is powershell...mainly because you need it for the long ass commands lol

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

                  @StuartJordan said in Managing Windows Local Users with PowerShell:

                  the only bonus, you do get tab completion is powershell...mainly because you need it for the long ass commands lol

                  Self fulfilling need 🙂

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

                    @StuartJordan said in Managing Windows Local Users with PowerShell:

                    even the net user command looks cleaner:
                    "net localgroup administrators username /add"

                    Yeah, faster, simpler, easier, more obvious, more memorable.

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

                      @WrCombs said in Managing Windows Local Users with PowerShell:

                      @StuartJordan said in Managing Windows Local Users with PowerShell:

                      so ugly compared to using bash in linux...I just hate the way powershell syntax is.

                      What does the syntax in linux "using bash" look like?

                      So definitely "using Bash" needs quotes, it's "in standard UNIX" and Bash just calls it. It's really Windows vs. Linux here rather than PowerShell vs Bash. But the "official" Windows way is this PS CmdLet mess. The standard Linux way looks like this...

                      useradd sally
                      

                      Then to add a password all at once is more complex. net user is the winner of simplicity.

                      Here is how you do a single line add with useradd in Linux...

                      useradd  -p $(echo mysecret | openssl passwd -1 -stdin) sally
                      
                      1 Reply Last reply Reply Quote 1
                      • scottalanmillerS
                        scottalanmiller
                        last edited by

                        Topic has been forked, please keep discussions of OS comparisons to a different thread.

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post