Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Creating Domain Controller With Powershell
WhatsApp
Ibrahim Ersoy
9y
8
k
0
0
25
Blog
Normally, you can create a domain controller via Server Manager by adding AD Domain Services roles & features.
But, there's a better way!
Executing a 4-line powershell script will help you accomplish same goal.
You can change $sampledomain variable as in the following code snippet:
$sampledomain =
"iersoy.com"
$AdminPass = ConvertTo-SecureString
"P@$$w0rd1"
-asPlainText -force
Add-Windowsfeature AD-Domain-Services -IncludeManagementTools
Install-ADDSForest -DomainName $sampledomain -SafeModeAdministratorPassword $AdminPass -Confirm:$
false
After executing this script in Administration mode in Windows Powershell, you'll be having a reboot.
Once you restart and Windows login screen appears, you shall see forest name starting with "IERSOY/{youradminusername}" .
Create Domain Controller
Creating Domain Controller Powershell
PowerShell
Up Next
Maximum Password Age Grayed Out, Cannot Change Password On Windows Server 2012 Or 2016 Domain Controller
Ebook Download
View all
Printing in C# Made Easy
Read by 22.3k people
Download Now!
Learn
View all
Membership not found