This article has not been completed yet. However, it may already contain  helpful Information and therefore it has been published at this stage.

# Rename Computer
Rename-Computer -NewName DC1

# Reboot
Restart-Computer -Force
# Set IP-Address & Gateway
New-NetIPAddress –IPAddress 192.168.15.10 -DefaultGateway 192.168.15.2 -PrefixLength 24 -InterfaceIndex (Get-NetAdapter).InterfaceIndex
# Set DNS - Server
Set-DNSClientServerAddress –InterfaceIndex (Get-NetAdapter).InterfaceIndex –ServerAddresses 192.168.15.2
Install-WindowsFeature -name AD-Domain-Services -IncludeManagementTools
Install-ADDSForest -DomainName test.lan -DomainNetBIOSName Test -InstallDNS

References:

https://petri.com/windows-server-2022-as-a-domain-controller/