Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgag/7bb464cdedf52ff62d8ba4e58c87baad to your computer and use it in GitHub Desktop.
Save mgag/7bb464cdedf52ff62d8ba4e58c87baad to your computer and use it in GitHub Desktop.
Install and Configure - Windows Server 2019 Core AD DC on ProxMox VM

Install and Configure - Windows Server 2019 Core AD DC on ProxMox VM

Initial configuration

# run 'sconfig':
Computer name
Remote desktop
Network settings
# disable firewall 
NETSH ADVFIREWALL set allprofiles state off
# install windows features
dism /online /Enable-Feature /FeatureName:TelnetClient
# Disable IP auto configuration in Windows Server Core
netsh interface ipv4 show inter
netsh interface ipv4 set interface numIdx dadtransmits=0 store=persistent
(where numIdx is the Idx number of your Nic noted in the previous step).
net stop dhcp 
sc config “dhcp” start= disabled
# allow remote access
netsh advfirewall firewall add rule name= "Open Port 3389 (RDP)" dir=in action=allow protocol=TCP localport=3389

install windows features and stage drivers locally

# run "PowerShell" command
powershell
# Allow remote management
Install-WindowsFeature RemoteAccess
Install-WindowsFeature RSAT-RemoteAccess-PowerShell
Install-WindowsFeature Routing

# display available drives
Get-PSDrive

# create local driver directory
mkdir -p c:\sys\drivers

# copy drivers from media to local directory
Copy-Item D:\vioscsi\2k19\ -Destination C:\sys\drivers\vioscsi\2k19 -Recurse
Copy-Item D:\NetKVM\2k19\ -Destination C:\sys\drivers\NetKVM\2k19 -Recurse
Copy-Item D:\Balloon\2k19\ -Destination C:\sys\drivers\Balloon\2k19 -Recurse
Copy-Item D:\vioserial\2k19\ -Destination C:\sys\drivers\vioserial\2k19 -Recurse
Copy-Item D:\guest-agent\ -Destination C:\sys\drivers\guest-agent -Recurse

implement drivers

# go to local directory with drivers
Set-Location C:\sys\drivers

# install drivers
pnputil -i -a C:\sys\Drivers\NetKVM\2k19\amd64\*.inf
pnputil -i -a C:\sys\Drivers\Balloon\2k19\amd64\*.inf
pnputil -i -a C:\sys\Drivers\vioserial\2k19\amd64\*.inf

# set up guest agent
Set-Location C:\sys\drivers\guest-agent
.\qemu-ga-x64.msi

Copy-Item C:\sys\drivers\Balloon\2k19\amd64 -Destination 'C:\Program Files\Balloon' -Recurse

Set-Location 'C:\Program Files\Balloon'
.\blnsvr.exe -i

Enable remote powershell sessions

on the win2k16 core server

# view current list of trusted hosts
Get-Item wsman:\localhost\client\trustedhosts

# add remote computer that will be connecting to core server
Set-Item wsman:\localhost\client\trustedhosts -Value <hostname or ip>

on the computer wanting to connect to the win2k16 core server

# enable psremoting if not in a domain
Enable-PSRemoting

# view current list of trusted hosts
Get-Item wsman:\localhost\client\trustedhosts

# add remote core server that you want to connect to
Set-Item wsman:\localhost\client\trustedhosts -Value <hostname or ip>

launch pssession from computer to server core

Enter-PSSession -ComputerName <server core ip or hostname> -Credential <server core username>

Citations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment