2
0

Added GCPW Registry Import

This commit is contained in:
bschaper 2024-12-11 12:42:52 -06:00
parent c75a19845f
commit 8cd4a1ca63
2 changed files with 25 additions and 0 deletions

View File

@ -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"

View File

@ -97,6 +97,11 @@ echo Deleted !deleted_count! shortcut(s) from the Public Desktop.
:: C:\Scripts\Software\gcpwstandaloneenterprise64.exe /silent /fullinstall :: C:\Scripts\Software\gcpwstandaloneenterprise64.exe /silent /fullinstall
:: echo Google Cloud Provider for Windows Installed Third Time... :: 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 :: Copy Login Scripts to User Startup
echo Copying Login Scripts to All Users... echo Copying Login Scripts to All Users...
powershell Copy-Item 'C:\Scripts\TCSE-Login.vbs' 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup' powershell Copy-Item 'C:\Scripts\TCSE-Login.vbs' 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup'