From b93635554d4894f4a731a6afb5fcfdb0fad5bf34 Mon Sep 17 00:00:00 2001 From: abrown38 Date: Thu, 8 Aug 2024 13:02:43 +0100 Subject: [PATCH] fixes --- .../files/OpenStackADBuildv7.5.ps1 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ansible/roles/win_domain_controller/files/OpenStackADBuildv7.5.ps1 b/ansible/roles/win_domain_controller/files/OpenStackADBuildv7.5.ps1 index 57b1867..39b7c5b 100644 --- a/ansible/roles/win_domain_controller/files/OpenStackADBuildv7.5.ps1 +++ b/ansible/roles/win_domain_controller/files/OpenStackADBuildv7.5.ps1 @@ -1,4 +1,4 @@ -set-timezone -id UTC +set-timezone -id UTC #Gather DC IP and Name $domaindetails = get-adcomputer -filter 'Name -like "*DC01*"' | foreach {$_.name} @@ -8,6 +8,7 @@ $RDSServer = $domaindetails $workbenchOU = Get-ADOrganizationalUnit -Filter 'Name -like "Workbench"'| foreach {$_.DistinguishedName} $DomainOU = Get-ADDomain | foreach {$_.DistinguishedName} $domainID = Get-ADDomain | foreach {$_.DNSRoot} +$winProject = (Get-ADDomain).DNSRoot.split('.')[0] $computersOU = get-addomain | foreach {$_.ComputersContainer} $domaincontrollersOU = get-addomain | foreach {$_.DomainControllersContainer} $homepage = "https://www.epcc.ed.ac.uk/" @@ -47,7 +48,7 @@ Set-GPRegistryValue -Name "Default Domain Policy" -ValueName "DevicePKInitEnable Set-GPRegistryValue -Name "Default Domain Policy" -ValueName "DevicePKInitBehavior" -Key "HKEY_LOCAL_MACHINE\software\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos\Parameters" -Value 0 -Type DWord Set-GPRegistryValue -Name "Default Domain Policy" -ValueName "MSAOptional" -Key "HKEY_LOCAL_MACHINE\software\Microsoft\Windows\CurrentVersion\Policies\System" -Value 1 -Type DWord Set-GPRegistryValue -Name "Default Domain Policy" -ValueName "MSAOptional" -Key "HKEY_LOCAL_MACHINE\software\Microsoft\Windows\CurrentVersion\Policies\System" -Value 1 -Type DWord -Set-GPRegistryValue -Name "Default Domain Policy" -ValueName "EnhancedAntiSpoofing" -Key "HKEY_LOCAL_MACHINE\software\Polic ies\Microsoft\Biometrics\FacialFeatures" -Value 1 -Type DWord +Set-GPRegistryValue -Name "Default Domain Policy" -ValueName "EnhancedAntiSpoofing" -Key "HKEY_LOCAL_MACHINE\software\Policies\Microsoft\Biometrics\FacialFeatures" -Value 1 -Type DWord Set-GPRegistryValue -Name "Default Domain Policy" -ValueName "AllowCamera" -Key "HKEY_LOCAL_MACHINE\software\Policies\Microsoft\Camera" -Value 0 -Type DWord Set-GPRegistryValue -Name "Default Domain Policy" -ValueName "BlockUserInputMethodsForSignIn" -Key "HKEY_LOCAL_MACHINE\software\Policies\Microsoft\Control Panel\International" -Value 1 -Type DWord Set-GPRegistryValue -Name "Default Domain Policy" -ValueName "AllowInputPersonalization" -Key "HKEY_LOCAL_MACHINE\software\Policies\Microsoft\InputPersonalization" -Value 0 -Type DWord @@ -266,7 +267,7 @@ Set-GPRegistryValue -Name "Firefox" -ValueName "FeatureRecommendations" -Key "HK Set-GPRegistryValue -Name "Firefox" -ValueName "MoreFromMozilla" -Key "HKEY_LOCAL_MACHINE\Software\Policies\Mozilla\Firefox\UserMessaging" -Value 1 -Type DWord Set-GPRegistryValue -Name "Firefox" -ValueName "SkipOnboarding" -Key "HKEY_LOCAL_MACHINE\Software\Policies\Mozilla\Firefox\UserMessaging" -Value 1 -Type DWord Set-GPRegistryValue -Name "Firefox" -ValueName "WhatsNew" -Key "HKEY_LOCAL_MACHINE\Software\Policies\Mozilla\Firefox\UserMessaging" -Value 0 -Type DWord -Set-GPRegistryValue -Name "Firefox" -ValueName "URL" -Key "HKEY_LOCAL_MACHINE\Software\Policies\Mozilla\Firefox\Homepage" -Value $homepage -Type DWord +Set-GPRegistryValue -Name "Firefox" -ValueName "URL" -Key "HKEY_LOCAL_MACHINE\Software\Policies\Mozilla\Firefox\Homepage" -Value $homepage -Type String Set-GPRegistryValue -Name "Firefox" -ValueName "StartPage" -Key "HKEY_LOCAL_MACHINE\Software\Policies\Mozilla\Firefox\Homepage" -Value homepage -Type DWord @@ -275,7 +276,7 @@ New-GPO -Name "Edge" -comment "Edge Settings for the workbench" Set-GPRegistryValue -Name "Edge" -ValueName "AllowSurfGame" -Key "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Edge" -Value 0 -Type DWord Set-GPRegistryValue -Name "Edge" -ValueName "ConfigureDoNotTrack" -Key "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Edge" -Value 0 -Type DWord Set-GPRegistryValue -Name "Edge" -ValueName "EnhanceSecurityModeOptOutUXEnabled" -Key "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Edge" -Value 1 -Type DWord -Set-GPRegistryValue -Name "Edge" -ValueName "URL" -Key "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Edge" -Value $homepage -Type DWord +Set-GPRegistryValue -Name "Edge" -ValueName "URL" -Key "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Edge" -Value $homepage -Type String Set-GPRegistryValue -Name "Edge" -ValueName "StartPage" -Key "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Edge" -Value homepage -Type DWord @@ -290,9 +291,9 @@ Set-GPRegistryValue -Name "StartMenu" -ValueName "NoClose" -key "HKEY_CURRENT_US Set-GPRegistryValue -Name "StartMenu" -ValueName "NoStartMenuEjectPC" -key "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Value 1 -Type DWord Set-GPRegistryValue -Name "StartMenu" -ValueName "NoStartMenuMYGames" -key "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Value 1 -Type DWord Set-GPRegistryValue -Name "StartMenu" -ValueName "LockedStartLayout" -key "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer" -Value 1 -Type DWord -Set-GPRegistryValue -Name "StartMenu" -ValueName "StartLayoutFile" -key "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer" -Value "C:\eidf\wawb01.xml" -Type DWord +Set-GPRegistryValue -Name "StartMenu" -ValueName "StartLayoutFile" -key "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer" -Value "C:\eidf\$winProject.xml" -Type String Set-GPRegistryValue -Name "StartMenu" -ValueName "LockedStartLayout" -key "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Explorer" -Value 1 -Type DWord -Set-GPRegistryValue -Name "StartMenu" -ValueName "StartLayoutFile" -key "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Explorer" -Value "C:\eidf\wawb01.xml" -Type DWord +Set-GPRegistryValue -Name "StartMenu" -ValueName "StartLayoutFile" -key "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Explorer" -Value "C:\eidf\$winProject.xml" -Type String Set-GPRegistryValue -Name "StartMenu" -ValueName "AllowWindows" -key "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\SrpV2\Appx" -Value 0 -Type DWord Set-GPRegistryValue -Name "StartMenu" -ValueName "AllowWindows" -key "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\SrpV2\Dll" -Value 0 -Type DWord Set-GPRegistryValue -Name "StartMenu" -ValueName "AllowWindows" -key "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\SrpV2\Exe" -Value 0 -Type DWord