diff --git a/GCPW/GCPW-AllowDomains.ps1 b/GCPW/GCPW-AllowDomains.ps1 new file mode 100644 index 0000000..0364645 --- /dev/null +++ b/GCPW/GCPW-AllowDomains.ps1 @@ -0,0 +1,20 @@ +# Define the registry path and value name +$registryPath = 'HKLM:\Software\Google\GCPW' +$valueName = 'domains_allowed_to_login' + +# Check if the GCPW key exists +if (Test-Path -Path $registryPath) { + Write-Warning "GCPW key already exists. Skipping creation." +} else { + # Create the GCPW key + New-Item -Path $registryPath -Force | Out-Null +} + +# Define the allowed domains (replace with your actual domains) +$allowedDomains = "tcse.us" + +# Set the registry value with allowed domains +New-ItemProperty -Path $registryPath -Name $valueName -Value $allowedDomains -PropertyType MultiString -Force + +# Confirmation message +Write-Host "GCPW registry key configured with allowed domains: $allowedDomains" \ No newline at end of file diff --git a/TCSE-Computer-Deploy.bat b/TCSE-Computer-Deploy.bat index f8b2470..713ac41 100644 --- a/TCSE-Computer-Deploy.bat +++ b/TCSE-Computer-Deploy.bat @@ -97,6 +97,11 @@ echo Deleted !deleted_count! shortcut(s) from the Public Desktop. :: C:\Scripts\Software\gcpwstandaloneenterprise64.exe /silent /fullinstall :: echo Google Cloud Provider for Windows Installed Third Time... +:: GCPW Add Allowed Domain to Registry +echo Adding Domain to GCPW Registry... +powershell -ExecutionPolicy Bypass -File "C:\Scripts\GCPW\GCPW-AllowDomains.ps1" +echo Allowed Domain Added to Registry... + :: Copy Login Scripts to User Startup echo Copying Login Scripts to All Users... powershell Copy-Item 'C:\Scripts\TCSE-Login.vbs' 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup'