Skip to content
News Liv Up

News Liv Up

Latest News & Blogs

Primary Menu News Liv Up

News Liv Up

  • Home
  • Real Estate
  • Business
  • Microsoft

How to change your domain computer name with Windows PowerShell

May 17, 2022 admin
How to change your domain computer name with Windows PowerShell

Renaming computers or modifying their host names can be tricky, especially when you’re doing it on hundreds of machines at once. If you’re using Windows PowerShell 3.0 or newer, however, you can use the Rename-Computer cmdlet to do this with one command (instead of spending hours going through the usual computer-management interface). Here’s how to change your domain computer name with Windows PowerShell.

Windows PowerShell

Useful for a number of reasons, but most often done because a user has changed their legal name.

Import-Module ActiveDirectory cd ad: cd laborteam64$OU distinguishedname=laborteam64$OU container=dc=laborteam64,dc=com $obj = Get-ADObject -SearchBase $(($Container).distinguishedname) ` -Filter { Name -like * } Set-ADObject $obj.Name New Name

 Computer Domain

Changing the name of a computer in Active Directory requires following the instructions for renaming a user account, only using the domain administrator’s credentials. To do this you will need an up-to-date installation of Microsoft Active Directory Management Tools. With this package installed, launch ADSI Edit and right-click on Configuration in the left pane of Windows Explorer. Select Properties from the menu that appears and type (in Object type): Computers. Now expand that node, then expand Domain Controllers and double-click on Computer Name. Select Computer object tab at top of screen, then enter new desired computer name in right pane of screen and click Rename. When prompted, press Enter to confirm old computer name is overwritten with new one before it takes effect. Press OK to complete process.

 Step 1: Add the ADDSDeployment module

The first step is adding the ADDSDeployment module for the work you want to do. One way of doing this is by using Import-Module and pointing it at the folder where the module is located: Import-Module .\ADDSDeployment

The next step is loading the ActiveDirectory Active Directory Module, which contains many commands that can be used in AD DS Management: Add-PSSnapin ActiveDirectory.

 Step 2: Connect to Domain Controller

It’s important that the first step is to ensure you are using an account that has Domain Admins privileges. However, if the computer isn’t on a domain and is only in a workgroup then this process will not work. Otherwise, type connect-msdsservice and press enter.

Now we need to search for a particular computer, as in our case joly1 which will show us more information about it. Type net view \\joly1 into command prompt and press enter.

 Step 3: Rename-Computer commandlet

  1. If you have never used the Rename-Computer commandlet before, go ahead and type out its name in the prompt: Rename-Computer – WhatIf
  2. As a result, you will get an output that lists all of the actions it would take on the specified computer including renaming it (i.e., Rename server THNDR), moving files and folders around (Move contents of C:\Windows\Users) as well as creating new files and folders, (Creating C:\Folder1).
  3. This information is great because it tells you exactly what it is going to do before actually doing anything for real.

 Step 4: Reboot

Since we don’t want to keep the same old hostname, that command also includes a line to restart the computer. If you don’t reboot, Windows won’t apply any of those changes until next time it’s powered on and takes a look at the settings again. So if you don’t plan on touching anything for the time being, type in restart (minus quotes) instead of reboot. Alternatively, you can use shutdown -r now instead of restart. Whatever choice you make in this step will start up where it left off when rebooting is finished. After that, you’ll be presented with a logon prompt.

 Step 5: Check if it worked

Now that you have done all this, it is time to check if the task was successful. First, open up a new elevated command prompt window and enter: ipconfig /all. Look for two specific values – Primary DNS suffix and NetBIOS domain name. Now compare these two values in the command prompt window with the ones on the Network Connections properties sheet. If they are different then you’re good!

Tags: batch file prompt for computer name, Change computer name Windows 10 batch file, display hostname on desktop windows 10, find computer name from login screen windows 10, script to display ip address on desktop', script to show computer name on desktop

Continue Reading

Previous How to seamlessly transfer your Microsoft Word macros to another computer
Next Microsoft Print Spooler Bugs Finally Fixed

More Stories

The Top 10 Tips for Summarizing Data in Excel
  • Microsoft

The Top 10 Tips for Summarizing Data in Excel

June 16, 2022 admin
How to Get Rid of Microsoft Edge on Windows 11
  • Microsoft

How to Get Rid of Microsoft Edge on Windows 11

June 16, 2022 admin
How to Find the Solution to Your Problems with Excel's Goal Seek Analysis Tool
  • Microsoft

How to Find the Solution to Your Problems with Excel’s Goal Seek Analysis Tool

June 16, 2022 admin

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Latest
  • Popular
  • Trending
  • what is lost mary vape
    • Marketing

    What is Lost mary vape

    March 16, 2023 admin
    • Business

    MYTHS ABOUT BANKRUPTCY DEBUNKED

    February 24, 2023 admin
  • Custom Vinyl Stickers
    • Tips

    How To Create Your Own Custom Vinyl Stickers For Any Occasion

    February 17, 2023 admin
    • Business

    Buying deviled egg tray with lid from wholesale vendors

    February 10, 2023 admin
    • Business

    Enhancing Your Computer Experience With Custom Mouse Pads

    February 9, 2023 admin
  • what is lost mary vape
    • Marketing

    What is Lost mary vape

    March 16, 2023 admin
  • Why You Shouldn't Use Google Chrome in 2022
    • Software

    Why You Shouldn’t Use Google Chrome in 2022

    April 11, 2022 admin
  • How to make summarizing and reporting easy with Excel PivotTables
    • Microsoft

    How to make summarizing and reporting easy with Excel PivotTables

    April 16, 2022 admin
    • Real Estate

    Real Estate Video Marketing the Benefits of Video in Real Estate

    May 4, 2022 admin
  • Hidden Costs of Credit Card Processing and How to Avoid Them
    • Business

    Hidden Costs of Credit Card Processing and How to Avoid Them

    May 4, 2022 admin
    • Business

    MYTHS ABOUT BANKRUPTCY DEBUNKED

    February 24, 2023 admin
    • Business

    Buying deviled egg tray with lid from wholesale vendors

    February 10, 2023 admin
    • Business

    Enhancing Your Computer Experience With Custom Mouse Pads

    February 9, 2023 admin
  • How To Make The Most Out Of Promoting Your Business On Facebook
    • Business

    How To Make The Most Out Of Promoting Your Business On Facebook

    June 13, 2022 admin
  • Is Your Payroll Security Up to Snuff 10 Tips to Keep Your Business Data Safe
    • Business

    Is Your Payroll Security Up to Snuff 10 Tips to Keep Your Business Data Safe

    June 4, 2022 admin

You may have missed

what is lost mary vape
  • Marketing

What is Lost mary vape

March 16, 2023 admin
  • Business

MYTHS ABOUT BANKRUPTCY DEBUNKED

February 24, 2023 admin
Custom Vinyl Stickers
  • Tips

How To Create Your Own Custom Vinyl Stickers For Any Occasion

February 17, 2023 admin
  • Business

Buying deviled egg tray with lid from wholesale vendors

February 10, 2023 admin
  • Business

Enhancing Your Computer Experience With Custom Mouse Pads

February 9, 2023 admin

Contact Us: [email protected]

Copyright © All rights reserved. | CoverNews by AF themes.