Install ADDS on Windows Server 2012 R2 with PowerShell
Install ADDS on Windows Server 2012 R2 with PowerShell
In this tutorial I’m installing ADDS on Windows Server 2012 R2 with PowerShell.
The old “Dcpromo.exe” is deprecated beginning with Windows Server 2012, but you can still rundcpromo.exe by using an answer file (dcpromo /unattend: or dcpromo /answer:). Since this is deprecated we might as well start using the new method since there is no need to migrate.
If you don’t have a copy, Download Windows Server 2012 R2 here and after installation don’t forget to run the “windows update” so you have all patches up to date.
Virtual Machine Setup:
OS: Windows Server 2012 R2
FQDN: dc01.ethernuno.intra
Processors 2 (1 per core)
Memory: 1Gb
Disk0: 50Gb
NIC: Bridge
IP Address: 192.168.1.10/24
Note: To install a new forest, you must be logged on as the local Administrator for the server.
Installing AD DS by with PowerShell
Open Windows PowerShell console with elevated privileges, and run the following command:
PS C:\Users\Administrator> Import-Module ServerManager
PS C:\Users\Administrator>
Install the AD DS server role, the AD DS and AD LDS server administration tools:
PS C:\Users\Administrator> Install-windowsfeature -name AD-Domain-Services –IncludeManagementTools
Success Restart Needed Exit Code Feature Result
------- -------------- --------- --------------
True No Success {Active Directory Domain Services, Group P...
PS C:\Users\Administrator>
Check the available cmdlets in the ADDSDeployment module.
PS C:\Users\Administrator> Get-command –module ADDSDeployment
CommandType Name ModuleName
----------- ---- ----------
Cmdlet Add-ADDSReadOnlyDomainControllerAccount ADDSDeployment
Cmdlet Install-ADDSDomain ADDSDeployment
Cmdlet Install-ADDSDomainController ADDSDeployment
Cmdlet Install-ADDSForest ADDSDeployment
Cmdlet Test-ADDSDomainControllerInstallation ADDSDeployment
Cmdlet Test-ADDSDomainControllerUninstallation ADDSDeployment
Cmdlet Test-ADDSDomainInstallation ADDSDeployment
Cmdlet Test-ADDSForestInstallation ADDSDeployment
Cmdlet Test-ADDSReadOnlyDomainControllerAccountCreation ADDSDeployment
Cmdlet Uninstall-ADDSDomainController ADDSDeployment
PS C:\Users\Administrator>
Note that you can run PowerShell cmdlets against remote servers using invoke-command with the ADDSDeployment cmdlet. To install AD DS on a remote server named dc02 in the ethernuno.intradomain, type:
PS C:\Users\Administrator> invoke-command {install-addsdomaincontroller –domainname ethernuno.intra –credential (get-credential) –computername dc02
Installing a new forest root domain using PowerShell
This is the best and simplest way to do it. To install a new forest named ethernuno.intra and be securely prompted to provide the DSRM password, type:
PS C:\Users\Administrator> Install-ADDSForest –domainname "ethernuno.intra"
SafeModeAdministratorPassword: *******
Confirm SafeModeAdministratorPassword: *******
The target server will be configured as a domain controller and restarted when this operation is complete.
Do you want to continue with this operation?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): A
Note: DNS server is installed by default when you run Install-ADDSForest.
Side note:
Although this is a lab you might want to install it the right way if you’re bringing your own server up. To do this you might want to separate your logs and database.
To install a new forest named ethernuno.intra, create a DNS delegation in the ethernuno.intradomain, set domain functional level to Windows Server 2008 R2 and set forest functional level to Windows Server 2008, install the Active Directory database and SYSVOL on the D:\ drive, install the log files on the E:\ drive, and be prompted to provide the Directory Services Restore Mode password and type:
PS C:\Users\Administrator> Install-ADDSForest –DomainName ethernuno.intra –CreateDNSDelegation –DomainMode Win2008 –ForestMode Win2008R2 –DatabasePath "d:\NTDS" –SYSVOLPath "d:\SYSVOL" –LogPath "e:\Logs"
If you answered “A” it will complete installation without prompting anything else and will also reboot.
Logon as Administrator on the new domain and check server manager. You can see in server manager that the AD DS is installed:
If you goto Start -> Administrative Tools, you can find all ADDS tools and the old AD Users and Computers manager:
How To Remove AD DS using PowerShell
To view the syntax and options for removing AD DS in PowerShell:
PS C:\Users\Administrator> Get-help Uninstall-ADDSDomainController
As an example, to demote with its minimal required arguments, the -credential argument is not required because the user logged on as a member of the Enterprise Admins group:
PS C:\Users\Administrator> Uninstall-ADDSDomainController –Forceremoval -Demoteoperationmasterrole
Use the Get-Command –Module ActiveDirectory to check the PowerShell commands that are available. I would advise you to start using PowerShell only and forget about gui manager. That’s where Microsoft is heading!
Hope you found this useful, lab on!
Install ADDS on Windows Server 2012 R2 with PowerShell的更多相关文章
- How to install SharePoint 2013 on Windows Server 2012 R2
[Update 26.02.2014] Many thanks to everybody commented on this post. As Falk already mentioned in th ...
- windows server 2012 r2 安装无法找到install.wim 错误代码0x80070026,以及制作U启动盘决解ISO文件超过5G大小限制的解决方案(转)
戴尔服务器r530 windows server 2012 r2 安装无法找到install.wim 错误代码0x80070026,以及制作U启动盘决解ISO文件超过5G大小限制的解决方案 关于在服务 ...
- Install SharePoint 2013 with SP1 on Windows Server 2012 R2 error - This Product requires .NF 4.5
博客地址:http://blog.csdn.net/FoxDave 最近因为项目需要要搭建SharePoint 2013的开发环境. 准备了Windows Server 2012 R2系统和Sha ...
- 安装windows server 2012 r2 的那点事儿
windows server 2012 r2 安装无法找到install.wim 错误代码0x80070026,以及制作U启动盘决解ISO文件超过5G大小限制的解决方案 用UltaISO刻录后,sou ...
- 在Windows Server 2012 R2上安装SharePoint 2013 with SP1失败,提示没有.net4.5的解决办法
现在的Server用Windows Server 2012 R2的越来越多了,在部署带Sp1的SharePoint2013的时候,走完预安装工具后,点击setup提示缺少.net4.5. 其实Wind ...
- [转]Installing SharePoint 2013 on Windows Server 2012 R2
转自:http://www.avivroth.com/2013/07/09/installing-sharepoint-2013-on-windows-server-2012-r2-preview/ ...
- Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境搭建教程
原文地址:http://www.osyunwei.com/archives/7378.html 搬运是为了自己找资料方便. 准备篇 一.环境说明: 操作系统:Windows Server 2012 R ...
- Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境搭建教程
准备篇 一.环境说明: 操作系统:Windows Server 2012 R2 PHP版本:php 5.5.8 MySQL版本:MySQL5.6.15 二.相关软件下载: 1.PHP下载地址: htt ...
- Windows Server 2012 R2 设置
一.任务栏左下角启动服务器管理器,然后进行设置.1.登录不显示服务器管理器 2.本地服务器,看到右边的IE增强的安全配置,如图所示,关闭两项内容.这样就关闭了IE增强安全提示框. 3.“工具”菜单,启 ...
随机推荐
- CPU保护模式DPL、CPL简易理解
现代INTEL CPU都有保护模式,实模式这两种CPU运行模式.当CPU加电,CPU初始化时就运行在是模式下,然后现代操作系统会从实模式跳转到保护模式! 为什么需要保护模式? 在最开始编程的汇编时代, ...
- 改善WPF应用程序性能的10大方法 (转发)
WPF(Windows Presentation Foundation)应用程序在没有图形加速设备的机器上运行速度很慢是个公开的秘密,给用户的感觉是它太吃资源了,WPF程序的性能和硬件确实有很大的关系 ...
- 【java】使用URL和CookieManager爬取页面的验证码和cookie并保存
使用java的net包和io包下的几个工具爬取页面的验证码图片并保存到本地. 然后可以把获取的cookie保存下来,做进一步处理.比如通过识别验证码,进一步使用验证码和用户名,密码,保存下来的cook ...
- 数据库SQL优化大总结之 百万级数据库优化方案2
网上关于SQL优化的教程很多,但是比较杂乱.近日有空整理了一下,写出来跟大家分享一下,其中有错误和不足的地方,还请大家纠正补充. 这篇文章我花费了大量的时间查找资料.修改.排版,希望大家阅读之后, ...
- 初学基础python记录
1.对于python来说,最重要的就是缩进.相当于其他语言的{}中括号. 2.转义快捷等 alt+p和alt+n来复制上下一行.变量使用时得先赋值,且大小写敏感,遵循变量命名规则.Python还允许用 ...
- [Asp.Net] web api 部署注意事项
在将web api项目部署到IIS上的时候 要将应用程序池设置成.net framework 4.0版本
- 基于PowerShell的Lync Server管理 使用C# 之 Telephony 功能 查看 /修改
本以为这个属性可以在用户信息中直接反应出来,但是看了好几遍还是没找到这个属性名称 这个功能没有在get-User 的结果中直接反映出来 但是可以通过 Property 查找单个选项 如: Get-Cs ...
- 文件IO——将文件dfs的文件内容第三个字节之后的内容复制到文件dfd中
/* 使用文件IO将文件fds中的内容复制到文件fdd中去 1.创建两个文件描述符 2.使用open()方法分别以只读只写方式将文件描述符符文件连接 3.将读位置后移三位 4.将fds内容存储到缓冲区 ...
- [OS] 可执行文件的装载
http://www.jianshu.com/p/e1300e7a4c48 1. 虚拟内存 在早期的计算机中,程序是直接运行在物理内存上的,程序在运行时访问的地址就是物理地址.可是,当计算机中同时运行 ...
- 标准输入输出 stdio 流缓冲 buffering in standard streams
From : http://www.pixelbeat.org/programming/stdio_buffering/ 译者:李秋豪 我发现找出标准流用的是什么缓冲是一件困难的事. 例如下面这个使用 ...