Added GCPW Registry Import
This commit is contained in:
parent
c75a19845f
commit
8cd4a1ca63
20
GCPW/GCPW-AllowDomains.ps1
Normal file
20
GCPW/GCPW-AllowDomains.ps1
Normal 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"
|
||||||
@ -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'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user