1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Windows Server 2016 構築時にやることリスト

Last updated at Posted at 2022-08-07

環境

・Windows Server 2016 Standard

やることリスト

毎回GUIでやるのは大変なのでコマンドでやっています。
ちなみに私の場合は、VBAでホスト名などを入れたら自動で設定コマンドを作成してくれるマクロを書いて使っています。
※全部一気にやろうとしたらおかしくなったので随所で再起動すること。

1.IPの設定、確認

//インターフェース"Ethernet0"に対して192.168.1.10/24(GWのIP:192.168.1.1)を設定
> netsh interface ip set address "Ethernet0" static 192.168.1.10 255.255.255.0 192.168.1.1
//確認
> ipconfig /all

2.ライセンス認証

//ライセンスキーABCD-EFGH-IJKLM-NOPQR-STUWVの登録
> DISM /online /Set-Edition:ServerStandard /ProductKey:ABCD-EFGH-IJKLM-NOPQR-STUWV /AcceptEula
//再起動
> shutdown /r

3.ホスト名の変更

//ホスト名をVM01に設定
> wmic computersystem where name="%computername%" call rename name="VM01"
//再起動
> shutdown /r

4.ドメインへの参加

//ドメインMYDOMAINに参加
> wmic ComputerSystem WHERE "name='%computername%'" CALL JoinDomainOrWorkgroup Name="MYDOMAIN" Password="MYDOMAINPassword01" Username="MYDOMAIN\Administrator" FJoinOptions=3
//再起動
> shutdown /r

5.リモートデスクトップの許可

> reg add HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server /v fDenyTSConnections /t REG_DWORD /d 0 /f

6.ADサーバ上でドメインユーザの作成

リモートデスクトップ接続できるドメインユーザを作成していきます。

//ドメインremoteuser01@mydomain.comにremoteuser01を追加
> dsadd user "CN=remoteuser01,CN=Users,DC=mydomain,DC=.com" -display "remoteuser01" -pwd "RemotePassword01" -upn "remoteuser01@mydomain.com"

7.作成したユーザをローカルのAdministratorsグループに追加

> net localgroup Administrators mydomain\remoteuser01 /add

8.作成したユーザに対してリモートアクセスを許可

> net localgroup "Remote Desktop Users" mydomain\remoteuser01 /add

9.ファイアウォール穴あけ

これはGUIでやってます…
「セキュリティが強化されたWindows Defender ファイアウォール」
→「受信の規則」
→以下の規則をクリックして右クリック
→「規則の有効化」
・リモートデスクトップユーザモードTCP受信
・ファイルとプリンターの共有エコー要求ICMPv4受信

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?