confvm added
This commit is contained in:
@@ -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 "<writeYourUserName>@$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
|
||||||
+4
-4
@@ -3,10 +3,10 @@
|
|||||||
# Define new user parameters
|
# Define new user parameters
|
||||||
$username = "Wormtongue" # Change this to the desired username
|
$username = "Wormtongue" # Change this to the desired username
|
||||||
$Password = Read-Host -Prompt 'Enter Password' -AsSecureString
|
$Password = Read-Host -Prompt 'Enter Password' -AsSecureString
|
||||||
$userPrincipalName = $username + "@" # Change to your domain
|
$userPrincipalName = $username + "Wormtongue@RohanIT.sec" # Change to your domain
|
||||||
$displayName = "" # Change this to the desired display name
|
$displayName = "Wormtongue" # Change this to the desired display name
|
||||||
$description = "" # Change this to a suitable description
|
$description = "SysAdm" # Change this to a suitable description
|
||||||
$path = "CN=Users,DC=<yourDomainName>,DC=<yourDomainNameEnding>" # Change the path to the appropriate path in your AD structure
|
$path = "CN=Users,DC=<RohanIT>,DC=<sec>" # Change the path to the appropriate path in your AD structure
|
||||||
# My path in the video CN=Users,DC=InfraIT,DC=sec (CN stands for Common Name, and DC stands for Domain Component)
|
# My path in the video CN=Users,DC=InfraIT,DC=sec (CN stands for Common Name, and DC stands for Domain Component)
|
||||||
# Users is a container in the root of the domain and not a OU (Organizational Unit)
|
# Users is a container in the root of the domain and not a OU (Organizational Unit)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user