Update create-domain.ps1
This commit is contained in:
1 parent
f8cc4a9ec7
commit
dfa0a09d43
1 file changed
+1
-1
@@ -51,7 +51,7 @@ if ((gwmi win32_computersystem).partofdomain -eq $false) {
|
|||||||
if ($adapters) {
|
if ($adapters) {
|
||||||
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Setting DNS"
|
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Setting DNS"
|
||||||
# Don't do this in Azure. If the network adatper description contains "Hyper-V", this won't apply changes.
|
# Don't do this in Azure. If the network adatper description contains "Hyper-V", this won't apply changes.
|
||||||
$adapters | ForEach-Object if (!($_.Description).Contains("Hyper-V")) {$_.SetDNSServerSearchOrder($newDNSServers)}
|
$adapters | ForEach-Object {if (!($_.Description).Contains("Hyper-V")) {$_.SetDNSServerSearchOrder($newDNSServers)}}
|
||||||
}
|
}
|
||||||
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Setting timezone to UTC"
|
Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Setting timezone to UTC"
|
||||||
c:\windows\system32\tzutil.exe /s "UTC"
|
c:\windows\system32\tzutil.exe /s "UTC"
|
||||||
|
|||||||
Reference in new issue
Block a user