Читать книгу Windows Server 2022 & Powershell All-in-One For Dummies - Sara Perrott - Страница 83

ADDING TO A DOMAIN FROM POWERSHELL

Оглавление

The ability to script the joining of the domain is a useful skill if you're going to be deploying any quantity of servers. Not only does adding a domain via PowerShell make it simpler to do, but it also helps to ensure that there are no mistakes in the process of joining the domain.

1 From the sconfig utility, type 15 to exit to command line (PowerShell).The PowerShell window opens on your Server Core box.

2 Use the Add-Computer command to add the server to the domain.Here’s an example:Add-Computer -DomainName "your_domain_name" -RestartA dialog box appears asking for a username and password.

3 Enter a username that is authorized to add systems to your Active Directory domain and enter the corresponding password.

4 Click OK.The server restarts.

Windows Server 2022 & Powershell All-in-One For Dummies

Подняться наверх