added folders and scripts

This commit is contained in:
Gramzon
2025-01-20 15:48:15 +01:00
parent f8ac849f76
commit 44898bf457
15 changed files with 667 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
#configureVM
# THIS SCRIPT MUST BE RUN AS ADMINISTRATOR ON SRV1, CLI1 and MGR
<# CHECKLIST:
- Windows Update is up to date
- Time zone is correct
- Set-TimeZone -id 'W. Europe Standard Time'
- Computer name is correct
- IP address is correct (non relevant for this lab)
- Keyboard layout is correct (Norwegian)
#>
# VM's for the lab needs DC1 IP-address as DNS server (must be done on VM's: SRV1, CLI1 and MGR)
# Why? Because the DNS server is the only one that knows about the domain
$ipaddressdc1 = "192.168.111.193" # IP-address of DC1
Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses $ipaddressdc1
# Check if configuration is correct
# Find DNS Servers . . . . . . . . . . . : IP.ADR.TIL.DC (192.168.111.193)
ipconfig /all
# Add the computer to the domain
$domainName = "RohanIT.sec" # replace with your domain name (e.g. InfraIT.sec)
$cred = Get-Credential -UserName "Wormtongue@$domainName" -Message 'Provide credentials for a domain admin'
Add-Computer -Credential $cred -DomainName $domainName -PassThru -Verbose
Restart-Computer
# When restarted, the computer will be joinedto the domain, and you can log in with a domain admin or user account