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 5 years have passed since last update.

Windows Server 2016 CoreインストールをPowerShellで設定する

Posted at

Windows Server 2016から、初期インストール時にあえて選ばないとGUIが付いてこないようになりました。
RSATをインストールする前に、コマンドラインで少し頑張ってみました。

初期設定

sconfig.cmdで次の設定ができます。

  • ドメインへの参加
  • コンピュータ名
  • ローカル管理者の追加
  • リモート管理の有効化
  • Windows Updateの設定
  • リモートデスクトップの有効化
  • IPアドレス

image.png

プロキシの設定

netshコマンドを使います。

netsh winhttp set proxy my.proxy.server:8000 "localhost;<local>"

:disappointed_relieved: これでいいはずなのですが、update-helpしてもヘルプをダウンロードできない。。。

Windows役割/機能のインストール

Install-WindowsFeature 役割名

役割名とインストール状況はGet-WindowsFeatureでわかります。

PowerShell Remotingを有効にする

Enable-PSRemoting -Force

リモートマシンからPowerShellを使う

$cred = Get-Credential
Enter-PSSession -Credential $cred コンピュータ名

Get-Credentialでは、リモートマシンへ接続するアカウントを入力します。

ドメインコントローラにする

$cred = Get-Credential
Install-ADDSDomainController -Credential $cred -InstallDns

Get-Credentialでは、ドメイン管理者のアカウントを入力します。

参照: https://docs.microsoft.com/en-us/powershell/module/addsdeployment/install-addsdomaincontroller

コマンドいろいろ

内容 コマンド
ログオフ logoff
再起動 shutdown /t 0 /r
シャットダウン shutdown /t 0 /s
タスクマネージャ taskmgr

感想

んn年前は、
「unixむりー、WindowsみたくGUIがないと管理できないー」
なんて言われることがよくありました。
Windows ServerがCUIオンリーになったのは、もうGUIなくてもいいくらいにITリテラシーが向上したという理解でいいのかな?

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?