Bash -> Powershell

This commit is contained in:
Chris Long
2019-03-24 10:08:19 +07:00
committed by GitHub
parent 57003667e0
commit 173723d96f

View File

@@ -1,8 +1,9 @@
# Purpose: Sets up the Server and Workstations OUs # Purpose: Sets up the Server and Workstations OUs
Write-Host "Checking DNS Settings before starting..." Write-Host "Checking DNS Settings before starting..."
Get-DnsClientServerAddress | Select-Object ExpandProperty ServerAddresses Get-DnsClientServerAddress | Select-Object ExpandProperty ServerAddresses
Write-Host "Hardcoding windomain.local as localhost via the hosts file" Write-Host "Hardcoding windomain.local via the hosts file"
echo -e "\n127.0.0.1 windomain.local" >> /etc/hosts Add-Content "c:\windows\system32\drivers\etc\hosts" " 192.168.38.102 windomain.local"
Add-Content "c:\windows\system32\drivers\etc\hosts" " 192.168.38.102 dc.windomain.local"
Write-Host "Checking AD services status..." Write-Host "Checking AD services status..."
$svcs = "adws","dns","kdc","netlogon" $svcs = "adws","dns","kdc","netlogon"
Get-Service -name $svcs -ComputerName localhost | Select Machinename,Name,Status Get-Service -name $svcs -ComputerName localhost | Select Machinename,Name,Status