Move local user account from one machine to another

Welcome Forums General PowerShell Q&A Move local user account from one machine to another

Viewing 2 reply threads
  • Author
    Posts
    • #221928
      Participant
      Topics: 1
      Replies: 1
      Points: 14
      Rank: Member

      Since there is no official command of move-localuser in powershell. This is what i am trying to work using a pipeline but still it’s not working. So my goal is to move all user from one machine to another machine via PS command. Any idea??

      icm -ComputerName WIN-M8BRMLOP443 {Get-LocalUser } | icm -ComputerName Newstar {Set-LocalUser -WhatIf}

      What if: Performing the operation “Modify local user” on target “admin”.
      What if: Performing the operation “Modify local user” on target “Administrator”.
      What if: Performing the operation “Modify local user” on target “DefaultAccount”.
      What if: Performing the operation “Modify local user” on target “Guest”.

    • #221949
      Participant
      Topics: 3
      Replies: 342
      Points: 1,130
      Helping Hand
      Rank: Community Hero

      You would just need to create each user there. Are you intending to change existing local users on the destination computer if they already exist?

       

    • #221958
      Participant
      Topics: 1
      Replies: 1
      Points: 14
      Rank: Member

      So i setup a new server and need to move all localuser from current server to new server (user password and group membership etc). So i can fetch the user account via get-localuser in csv file and create users on destination server via csv file but the question comes about password and group memeberships how to move them??

Viewing 2 reply threads
  • You must be logged in to reply to this topic.