Server Core Tasks
Description:
When installing Server Core, it is common to do tasks such as these.
To Resolve:
-
Set IP Address/ Gateway/ DNS:
1 2 3
Get-NetAdapter New-NetIPAddress -InterfaceIndex 2 -IPAddress 192.168.1.101 -PrefixLength 24 -DefaultGateway 192.168.1.1 Set-DNSClientServerAddress -InterfaceIndex 2 -ServerAddresses @("8.8.8.8", "8.8.4.4")
-
Enable/Disable Windows Firewall:
1
Set-NetFirewallProfile -Name Public,Private,Domain -Enabled False
-
Add/Remove features:
1
Get-WindowsFeature | Where-Object Installed -eq True
-
Join to Domain:
1
Add-computer -DomainName mydomain.com
-
Activate Windows:
- To see current license:
slmgr /dlv
- To activate:
Slmgr /ato
- To see current license:
-
Add local users:
1 2
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.
-
Verify the current Windows Update setting:
%systemroot%\system32\Cscript scregedit.wsf /AU /v
- To enable automatic updates:
1 2 3
Net stop wuauserv %systemroot%\system32\Cscript scregedit.wsf /AU 4 Net start wuauserv
- To disable automatic updates, run:
1 2 3
Net stop wuauserv %systemroot%\system32\Cscript scregedit.wsf /AU 1 Net start wuauserv
Comments