locked
Need to Unjoin domain, change machine name then rejoin domain. RRS feed

  • Question

  • Hello everyone and thank you in advance for your help.

    I found a great script (http://www.computerperformance.co.uk/powershell/powershell3-rename-computer.htm#PowerShell_Script_to_Rename_Multiple_Computers_)

    that will be a time saver for me.  Unfortunately I keep getting access denied errors.  I am thinking that it is because the PC's are on a domain.

    Does anyone know of a script, or 2 or 3 if needed, that will take the PC's off the domain, change the machine name, then join the domain and reboot?

    If it were in 1 script that would put me in forever debt to you all.  But like previously stated 3 separate scripts will also make me happy.

    Thank you

    Wednesday, August 9, 2017 7:36 PM

Answers

  • Please review the following;  This forum is for scripting questions rather than script requests

    You can look in the Gallery for pre-written scripts that might solve your issue: http://gallery.technet.microsoft.com

    It is not necessary to remove a PC tp rename it in a domain.  You must be an administrator on the domain to do this.

    I recommend that yu start by learning basic Windows management in a domain.  Domains ae nt designed to be managed by end users.  Yu must have basic training.

    We do not write or provide scripts on request.  The Gallery has many scripts to rename PCs.  Please find one that you can understand or contact a consultant to help you.

    If you have a specific question about a script then post a new question with an example and your question.


    \_(ツ)_/

    • Marked as answer by Mr. Haus Wednesday, August 9, 2017 10:37 PM
    • Unmarked as answer by Mr. Haus Wednesday, August 9, 2017 10:39 PM
    • Marked as answer by Mr. Haus Wednesday, August 9, 2017 10:41 PM
    Wednesday, August 9, 2017 7:45 PM

All replies

  • Please review the following;  This forum is for scripting questions rather than script requests

    You can look in the Gallery for pre-written scripts that might solve your issue: http://gallery.technet.microsoft.com

    It is not necessary to remove a PC tp rename it in a domain.  You must be an administrator on the domain to do this.

    I recommend that yu start by learning basic Windows management in a domain.  Domains ae nt designed to be managed by end users.  Yu must have basic training.

    We do not write or provide scripts on request.  The Gallery has many scripts to rename PCs.  Please find one that you can understand or contact a consultant to help you.

    If you have a specific question about a script then post a new question with an example and your question.


    \_(ツ)_/

    • Marked as answer by Mr. Haus Wednesday, August 9, 2017 10:37 PM
    • Unmarked as answer by Mr. Haus Wednesday, August 9, 2017 10:39 PM
    • Marked as answer by Mr. Haus Wednesday, August 9, 2017 10:41 PM
    Wednesday, August 9, 2017 7:45 PM
  • Thank you.  I found that I was missing the attribute -domaincredential and that was giving me the access denied errors.  Thanks for your time.
    Wednesday, August 9, 2017 10:42 PM