Server Core Tasks

less than 1 minute read


When installing Server Core, it is common to do tasks such as these.

To Resolve:

1a. Set IP Address/ Gateway/ DNS:

New-NetIPAddress -InterfaceIndex 2 -IPAddress -PrefixLength 24 -DefaultGateway
Set-DNSClientServerAddress -InterfaceIndex 2 -ServerAddresses @("", "")
  1. Enable/Disable Windows Firewall:
Set-NetFirewallProfile -Name Public,Private,Domain -Enabled False
  1. Add/Remove features:
Get-WindowsFeature | Where-Object Installed -eq True
  1. Join to Domain:
Add-computer -DomainName
  1. Activate Windows:
    To see current license: slmgr /dlv
    To activate: Slmgr /ato

  2. Add local users:

net user gerry MyPass! /add
net localgroup administrators gerry /add

# Then, on the actual host, sign out. Hit esc, other sign in options – .\gerry and sign in just to make sure the account is there.

  1. Verify the current Windows Update setting:
    %systemroot%\system32\Cscript scregedit.wsf /AU /v

7a. To enable automatic updates:
Net stop wuauserv
%systemroot%\system32\Cscript scregedit.wsf /AU 4
Net start wuauserv

7b. To disable automatic updates, run:
Net stop wuauserv
%systemroot%\system32\Cscript scregedit.wsf /AU 1
Net start wuauserv