Powershell 部署域服务新建林

搬砖日常(* ̄︶ ̄)
部署域服务,新建林和DnsServer.


修改计算机名称,修改完成重启。

Rename-Computer -NewName "H2019-DC01" -Restart

安装活动目录域服务及管理工具;

新建林并安装DNSServer服务,林和域级别 2012R2

Install-WindowsFeature AD-Domain-Services -IncludeManagementTools

Install-ADDSForest -DomainName "corp.contoso.com" -InstallDNS -DomainMode Win2012R2 -ForestMode Win2012R2

# Install-ADDSForest WinSer 2019 Syntax
# NAME
#     Install-ADDSForest
# 
# SYNTAX
#     Install-ADDSForest -DomainName <string> [-SkipPreChecks] [-SafeModeAdministratorPassword <securestring>]
#     [-CreateDnsDelegation] [-DatabasePath <string>] [-DnsDelegationCredential <pscredential>] [-NoDnsOnNetwork]
#     [-DomainMode {Win2008 | Win2008R2 | Win2012 | Win2012R2 | WinThreshold | Default}] [-DomainNetbiosName <string>]
#     [-ForestMode {Win2008 | Win2008R2 | Win2012 | Win2012R2 | WinThreshold | Default}] [-InstallDns] [-LogPath
#     <string>] [-NoRebootOnCompletion] [-SkipAutoConfigureDns] [-SysvolPath <string>] [-Force] [-WhatIf] [-Confirm]
#     [<CommonParameters>]

# Example: Install a new forest and a DNS delegation
# Install-ADDSForest -DomainName "corp.contoso.com" -CreateDNSDelegation -DomainMode Win2008R2 -ForestMode Win2008R2 -DatabasePath "d:\NTDS" -SysvolPath "d:\SYSVOL" -LogPath "e:\Logs"

在这里插入图片描述


Loading

Quoting:​ ​https://learn.microsoft.com/en-us/powershell/module/addsdeployment/install-addsforest?view=windowsserver2022-ps​

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值