2
0

Cleaned Up Deploy, Consolidated Patches Folder, Added ImageGlass, Updated Auto Unattend.

This commit is contained in:
bschaper 2024-12-11 14:42:00 -06:00
parent a5124f3154
commit e8c5c9feb5
15 changed files with 106 additions and 99 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<!--https://schneegans.de/windows/unattend-generator/?LanguageMode=Unattended&UILanguage=en-US&Locale=en-US&Keyboard=00000409&GeoLocation=244&ProcessorArchitecture=amd64&BypassRequirementsCheck=true&BypassNetworkCheck=true&ComputerNameMode=Random&CompactOsMode=Default&TimeZoneMode=Explicit&TimeZone=Central+Standard+Time&PartitionMode=Unattended&PartitionLayout=GPT&EspSize=600&RecoveryMode=Partition&RecoverySize=1500&WindowsEditionMode=Unattended&WindowsEdition=pro_education&UserAccountMode=Unattended&AccountName0=Tech&AccountPassword0=SandlotSlickBoat%2325&AccountGroup0=Administrators&AccountName1=&AccountName2=&AccountName3=&AccountName4=&AutoLogonMode=Own&PasswordExpirationMode=Unlimited&LockoutMode=Default&HideFiles=Hidden&TaskbarSearch=Icon&ShowFileExtensions=true&DisableWidgets=true&LeftTaskbar=true&DeleteTaskbarIcons=true&HideTaskViewButton=true&DisableBingResults=true&AllowPowerShellScripts=true&DisableAppSuggestions=true&PreventDeviceEncryption=true&HideEdgeFre=true&WifiMode=Skip&ExpressSettings=DisableAll&KeysMode=Skip&ColorMode=Custom&SystemColorTheme=Light&AppsColorTheme=Light&AccentColor=%230078d4&WallpaperMode=Solid&WallpaperColor=%230978d3&Remove3DViewer=true&RemoveBingSearch=true&RemoveCalculator=true&RemoveCamera=true&RemoveClipchamp=true&RemoveClock=true&RemoveCopilot=true&RemoveCortana=true&RemoveDevHome=true&RemoveFamily=true&RemoveFeedbackHub=true&RemoveGetHelp=true&RemoveHandwriting=true&RemoveInternetExplorer=true&RemoveMailCalendar=true&RemoveMaps=true&RemoveMathInputPanel=true&RemoveMediaFeatures=true&RemoveMixedReality=true&RemoveZuneVideo=true&RemoveNews=true&RemoveOffice365=true&RemoveOneDrive=true&RemoveOneNote=true&RemoveOneSync=true&RemoveOpenSSHClient=true&RemoveOutlook=true&RemovePaint3D=true&RemovePeople=true&RemovePowerAutomate=true&RemovePowerShell2=true&RemovePowerShellISE=true&RemoveQuickAssist=true&RemoveRecall=true&RemoveRdpClient=true&RemoveSkype=true&RemoveSolitaire=true&RemoveSpeech=true&RemoveStepsRecorder=true&RemoveTeams=true&RemoveGetStarted=true&RemoveToDo=true&RemoveVoiceRecorder=true&RemoveWallet=true&RemoveWeather=true&RemoveFaxAndScan=true&RemoveWindowsHello=true&RemoveWindowsMediaPlayer=true&RemoveZuneMusic=true&RemoveWordPad=true&RemoveXboxApps=true&RemoveYourPhone=true&StartTilesMode=Default&StartPinsMode=Empty&FirstLogonScript0=curl+-L+https%3A%2F%2Fgitea.tcse.us%2Ftricounty%2Ftcse-deploy%2Farchive%2Fmain.zip+%2D%2Doutput+C%3A%5CScripts.zip&FirstLogonScriptType0=Cmd&FirstLogonScript1=Expand-Archive+-Path+%27C%3A%5CScripts.zip%27+-DestinationPath+%27C%3A%5CScripts%27%0D%0ARemove-Item+-Path+%27C%3A%5CScripts.zip%27%0D%0AMove-Item+-Path+%27C%3A%5CScripts%5Ctcse-deploy%5C*%27+-Destination+%27C%3A%5CScripts%27%0D%0ARemove-Item+-Path+%27C%3A%5CScripts%5Ctcse-deploy%5C%27&FirstLogonScriptType1=Ps1&FirstLogonScript2=C%3A%5CScripts%5CTCSE-Computer-Deploy.bat&FirstLogonScriptType2=Cmd&WdacMode=Skip-->
<!--https://schneegans.de/windows/unattend-generator/?LanguageMode=Unattended&UILanguage=en-US&Locale=en-US&Keyboard=00000409&GeoLocation=244&ProcessorArchitecture=amd64&BypassRequirementsCheck=true&BypassNetworkCheck=true&ComputerNameMode=Script&ComputerNameScript=return+Read-Host+-Prompt+%27Enter+computer+name%27%3B&CompactOsMode=Default&TimeZoneMode=Explicit&TimeZone=Central+Standard+Time&PartitionMode=Unattended&PartitionLayout=GPT&EspSize=600&RecoveryMode=Partition&RecoverySize=1500&WindowsEditionMode=Unattended&WindowsEdition=pro&UserAccountMode=Unattended&AccountName0=Tech&AccountPassword0=SandlotSlickBoat%2325&AccountGroup0=Administrators&AccountName1=&AccountName2=&AccountName3=&AccountName4=&AutoLogonMode=Own&PasswordExpirationMode=Unlimited&LockoutMode=Default&HideFiles=Hidden&TaskbarSearch=Icon&ShowFileExtensions=true&DisableWidgets=true&LeftTaskbar=true&DeleteTaskbarIcons=true&HideTaskViewButton=true&DisableBingResults=true&AllowPowerShellScripts=true&DisableAppSuggestions=true&PreventDeviceEncryption=true&HideEdgeFre=true&WifiMode=Skip&ExpressSettings=DisableAll&KeysMode=Skip&ColorMode=Custom&SystemColorTheme=Light&AppsColorTheme=Light&AccentColor=%230078d4&WallpaperMode=Solid&WallpaperColor=%230978d3&Remove3DViewer=true&RemoveBingSearch=true&RemoveCalculator=true&RemoveCamera=true&RemoveClipchamp=true&RemoveClock=true&RemoveCopilot=true&RemoveCortana=true&RemoveDevHome=true&RemoveFamily=true&RemoveFeedbackHub=true&RemoveGetHelp=true&RemoveHandwriting=true&RemoveInternetExplorer=true&RemoveMailCalendar=true&RemoveMaps=true&RemoveMathInputPanel=true&RemoveMediaFeatures=true&RemoveMixedReality=true&RemoveZuneVideo=true&RemoveNews=true&RemoveOffice365=true&RemoveOneDrive=true&RemoveOneNote=true&RemoveOneSync=true&RemoveOpenSSHClient=true&RemoveOutlook=true&RemovePaint3D=true&RemovePeople=true&RemovePhotos=true&RemovePowerAutomate=true&RemovePowerShell2=true&RemovePowerShellISE=true&RemoveQuickAssist=true&RemoveRecall=true&RemoveRdpClient=true&RemoveSkype=true&RemoveSolitaire=true&RemoveSpeech=true&RemoveStepsRecorder=true&RemoveStickyNotes=true&RemoveTeams=true&RemoveGetStarted=true&RemoveToDo=true&RemoveVoiceRecorder=true&RemoveWallet=true&RemoveWeather=true&RemoveFaxAndScan=true&RemoveWindowsHello=true&RemoveWindowsMediaPlayer=true&RemoveZuneMusic=true&RemoveWordPad=true&RemoveXboxApps=true&RemoveYourPhone=true&StartTilesMode=Default&StartPinsMode=Empty&FirstLogonScript0=curl+-L+https%3A%2F%2Fgitea.tcse.us%2Ftricounty%2Ftcse-deploy%2Farchive%2Fmain.zip+%2D%2Doutput+C%3A%5CScripts.zip&FirstLogonScriptType0=Cmd&FirstLogonScript1=Expand-Archive+-Path+%27C%3A%5CScripts.zip%27+-DestinationPath+%27C%3A%5CScripts%27%0D%0ARemove-Item+-Path+%27C%3A%5CScripts.zip%27%0D%0AMove-Item+-Path+%27C%3A%5CScripts%5Ctcse-deploy%5C*%27+-Destination+%27C%3A%5CScripts%27%0D%0ARemove-Item+-Path+%27C%3A%5CScripts%5Ctcse-deploy%5C%27&FirstLogonScriptType1=Ps1&FirstLogonScript2=C%3A%5CScripts%5CTCSE-Computer-Deploy.bat&FirstLogonScriptType2=Cmd&WdacMode=Skip-->
<settings pass="offlineServicing"></settings>
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
@ -23,7 +23,7 @@
</ImageInstall>
<UserData>
<ProductKey>
<Key>8PTT6-RNW4C-6V7J2-C2D3X-MHBPB</Key>
<Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</Key>
</ProductKey>
<AcceptEula>true</AcceptEula>
</UserData>
@ -62,6 +62,10 @@
</settings>
<settings pass="generalize"></settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<ComputerName>TEMPNAME</ComputerName>
<TimeZone>Central Standard Time</TimeZone>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
@ -86,9 +90,6 @@
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<TimeZone>Central Standard Time</TimeZone>
</component>
</settings>
<settings pass="auditSystem"></settings>
<settings pass="auditUser"></settings>
@ -159,6 +160,41 @@ foreach( $file in $Document.unattend.Extensions.File ) {
}
}
</ExtractScript>
<File path="C:\Windows\Setup\Scripts\GetComputerName.ps1" transformation="Text">
return Read-Host -Prompt 'Enter computer name';
</File>
<File path="C:\Windows\Setup\Scripts\SetComputerName.ps1" transformation="Text">
$ErrorActionPreference = 'Stop';
Set-StrictMode -Version 'Latest';
&amp; {
$newName = ( Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\ComputerName.txt' -Raw ).Trim();
if( [string]::IsNullOrWhitespace( $newName ) ) {
throw "No computer name was provided.";
}
$keys = @(
@{
LiteralPath = 'Registry::HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName';
Name = 'ComputerName';
};
@{
LiteralPath = 'Registry::HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters';
Name = 'Hostname';
};
@{
LiteralPath = 'Registry::HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters';
Name = 'NV Hostname';
};
);
while( $true ) {
foreach( $key in $keys ) {
Set-ItemProperty @key -Type 'String' -Value $newName;
}
Start-Sleep -Milliseconds 50;
}
} *&gt;&amp;1 &gt;&gt; 'C:\Windows\Setup\Scripts\SetComputerName.log';
</File>
<File path="C:\Windows\Setup\Scripts\RemovePackages.ps1" transformation="Text">
$selectors = @(
'Microsoft.Microsoft3DViewer';
@ -182,10 +218,12 @@ $selectors = @(
'Microsoft.OutlookForWindows';
'Microsoft.MSPaint';
'Microsoft.People';
'Microsoft.Windows.Photos';
'Microsoft.PowerAutomateDesktop';
'MicrosoftCorporationII.QuickAssist';
'Microsoft.SkypeApp';
'Microsoft.MicrosoftSolitaireCollection';
'Microsoft.MicrosoftStickyNotes';
'MicrosoftTeams';
'MSTeams';
'Microsoft.Todos';
@ -491,6 +529,11 @@ C:\Scripts\TCSE-Computer-Deploy.bat
</File>
<File path="C:\Windows\Setup\Scripts\Specialize.ps1" transformation="Text">
$scripts = @(
{
Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\GetComputerName.ps1' -Raw | Invoke-Expression &gt; 'C:\Windows\Setup\Scripts\ComputerName.txt';
Start-Process -FilePath ( Get-Process -Id $PID ).Path -ArgumentList '-NoProfile', '-Command', 'Get-Content -LiteralPath "C:\Windows\Setup\Scripts\SetComputerName.ps1" -Raw | Invoke-Expression;' -WindowStyle 'Hidden';
Start-Sleep -Seconds 10;
};
{
reg.exe add "HKLM\SYSTEM\Setup\MoSetup" /v AllowUpgradesWithUnsupportedTPMOrCPU /t REG_DWORD /d 1 /f;
};

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<!--https://schneegans.de/windows/unattend-generator/?LanguageMode=Unattended&UILanguage=en-US&Locale=en-US&Keyboard=00000409&GeoLocation=244&ProcessorArchitecture=amd64&BypassRequirementsCheck=true&BypassNetworkCheck=true&ComputerNameMode=Random&CompactOsMode=Default&TimeZoneMode=Explicit&TimeZone=Central+Standard+Time&PartitionMode=Unattended&PartitionLayout=GPT&EspSize=600&RecoveryMode=Partition&RecoverySize=1500&WindowsEditionMode=Unattended&WindowsEdition=pro_education&UserAccountMode=Unattended&AccountName0=Tech&AccountPassword0=SandlotSlickBoat%2325&AccountGroup0=Administrators&AccountName1=&AccountName2=&AccountName3=&AccountName4=&AutoLogonMode=Own&PasswordExpirationMode=Unlimited&LockoutMode=Default&HideFiles=Hidden&TaskbarSearch=Icon&ShowFileExtensions=true&DisableWidgets=true&LeftTaskbar=true&DeleteTaskbarIcons=true&HideTaskViewButton=true&DisableBingResults=true&AllowPowerShellScripts=true&DisableAppSuggestions=true&PreventDeviceEncryption=true&HideEdgeFre=true&WifiMode=Unattended&WifiName=Tricounty&WifiAuthentication=WPA2PSK&WifiPassword=TCSEwifi19%21&ExpressSettings=DisableAll&KeysMode=Skip&ColorMode=Custom&SystemColorTheme=Light&AppsColorTheme=Light&AccentColor=%230078d4&WallpaperMode=Solid&WallpaperColor=%230978d3&Remove3DViewer=true&RemoveBingSearch=true&RemoveCalculator=true&RemoveCamera=true&RemoveClipchamp=true&RemoveClock=true&RemoveCopilot=true&RemoveCortana=true&RemoveDevHome=true&RemoveFamily=true&RemoveFeedbackHub=true&RemoveGetHelp=true&RemoveHandwriting=true&RemoveInternetExplorer=true&RemoveMailCalendar=true&RemoveMaps=true&RemoveMathInputPanel=true&RemoveMediaFeatures=true&RemoveMixedReality=true&RemoveZuneVideo=true&RemoveNews=true&RemoveOffice365=true&RemoveOneDrive=true&RemoveOneNote=true&RemoveOneSync=true&RemoveOpenSSHClient=true&RemoveOutlook=true&RemovePaint3D=true&RemovePeople=true&RemovePowerAutomate=true&RemovePowerShell2=true&RemovePowerShellISE=true&RemoveQuickAssist=true&RemoveRecall=true&RemoveRdpClient=true&RemoveSkype=true&RemoveSolitaire=true&RemoveSpeech=true&RemoveStepsRecorder=true&RemoveTeams=true&RemoveGetStarted=true&RemoveToDo=true&RemoveVoiceRecorder=true&RemoveWallet=true&RemoveWeather=true&RemoveFaxAndScan=true&RemoveWindowsHello=true&RemoveWindowsMediaPlayer=true&RemoveZuneMusic=true&RemoveWordPad=true&RemoveXboxApps=true&RemoveYourPhone=true&StartTilesMode=Default&StartPinsMode=Empty&FirstLogonScript0=curl+-L+https%3A%2F%2Fgitea.tcse.us%2Ftricounty%2Ftcse-deploy%2Farchive%2Fmain.zip+%2D%2Doutput+C%3A%5CScripts.zip&FirstLogonScriptType0=Cmd&FirstLogonScript1=Expand-Archive+-Path+%27C%3A%5CScripts.zip%27+-DestinationPath+%27C%3A%5CScripts%27%0D%0ARemove-Item+-Path+%27C%3A%5CScripts.zip%27%0D%0AMove-Item+-Path+%27C%3A%5CScripts%5Ctcse-deploy%5C*%27+-Destination+%27C%3A%5CScripts%27%0D%0ARemove-Item+-Path+%27C%3A%5CScripts%5Ctcse-deploy%5C%27&FirstLogonScriptType1=Ps1&FirstLogonScript2=C%3A%5CScripts%5CTCSE-Computer-Deploy.bat&FirstLogonScriptType2=Cmd&WdacMode=Skip-->
<!--https://schneegans.de/windows/unattend-generator/?LanguageMode=Unattended&UILanguage=en-US&Locale=en-US&Keyboard=00000409&GeoLocation=244&ProcessorArchitecture=amd64&BypassRequirementsCheck=true&BypassNetworkCheck=true&ComputerNameMode=Script&ComputerNameScript=return+Read-Host+-Prompt+%27Enter+computer+name%27%3B&CompactOsMode=Default&TimeZoneMode=Explicit&TimeZone=Central+Standard+Time&PartitionMode=Unattended&PartitionLayout=GPT&EspSize=600&RecoveryMode=Partition&RecoverySize=1500&WindowsEditionMode=Unattended&WindowsEdition=pro&UserAccountMode=Unattended&AccountName0=Tech&AccountPassword0=SandlotSlickBoat%2325&AccountGroup0=Administrators&AccountName1=&AccountName2=&AccountName3=&AccountName4=&AutoLogonMode=Own&PasswordExpirationMode=Unlimited&LockoutMode=Default&HideFiles=Hidden&TaskbarSearch=Icon&ShowFileExtensions=true&DisableWidgets=true&LeftTaskbar=true&DeleteTaskbarIcons=true&HideTaskViewButton=true&DisableBingResults=true&AllowPowerShellScripts=true&DisableAppSuggestions=true&PreventDeviceEncryption=true&HideEdgeFre=true&WifiMode=Unattended&WifiName=Tricounty&WifiAuthentication=WPA2PSK&WifiPassword=TCSEwifi19%21&ExpressSettings=DisableAll&KeysMode=Skip&ColorMode=Custom&SystemColorTheme=Light&AppsColorTheme=Light&AccentColor=%230078d4&WallpaperMode=Solid&WallpaperColor=%230978d3&Remove3DViewer=true&RemoveBingSearch=true&RemoveCalculator=true&RemoveCamera=true&RemoveClipchamp=true&RemoveClock=true&RemoveCopilot=true&RemoveCortana=true&RemoveDevHome=true&RemoveFamily=true&RemoveFeedbackHub=true&RemoveGetHelp=true&RemoveHandwriting=true&RemoveInternetExplorer=true&RemoveMailCalendar=true&RemoveMaps=true&RemoveMathInputPanel=true&RemoveMediaFeatures=true&RemoveMixedReality=true&RemoveZuneVideo=true&RemoveNews=true&RemoveOffice365=true&RemoveOneDrive=true&RemoveOneNote=true&RemoveOneSync=true&RemoveOpenSSHClient=true&RemoveOutlook=true&RemovePaint3D=true&RemovePeople=true&RemovePhotos=true&RemovePowerAutomate=true&RemovePowerShell2=true&RemovePowerShellISE=true&RemoveQuickAssist=true&RemoveRecall=true&RemoveRdpClient=true&RemoveSkype=true&RemoveSolitaire=true&RemoveSpeech=true&RemoveStepsRecorder=true&RemoveStickyNotes=true&RemoveTeams=true&RemoveGetStarted=true&RemoveToDo=true&RemoveVoiceRecorder=true&RemoveWallet=true&RemoveWeather=true&RemoveFaxAndScan=true&RemoveWindowsHello=true&RemoveWindowsMediaPlayer=true&RemoveZuneMusic=true&RemoveWordPad=true&RemoveXboxApps=true&RemoveYourPhone=true&StartTilesMode=Default&StartPinsMode=Empty&FirstLogonScript0=curl+-L+https%3A%2F%2Fgitea.tcse.us%2Ftricounty%2Ftcse-deploy%2Farchive%2Fmain.zip+%2D%2Doutput+C%3A%5CScripts.zip&FirstLogonScriptType0=Cmd&FirstLogonScript1=Expand-Archive+-Path+%27C%3A%5CScripts.zip%27+-DestinationPath+%27C%3A%5CScripts%27%0D%0ARemove-Item+-Path+%27C%3A%5CScripts.zip%27%0D%0AMove-Item+-Path+%27C%3A%5CScripts%5Ctcse-deploy%5C*%27+-Destination+%27C%3A%5CScripts%27%0D%0ARemove-Item+-Path+%27C%3A%5CScripts%5Ctcse-deploy%5C%27&FirstLogonScriptType1=Ps1&FirstLogonScript2=C%3A%5CScripts%5CTCSE-Computer-Deploy.bat&FirstLogonScriptType2=Cmd&WdacMode=Skip-->
<settings pass="offlineServicing"></settings>
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
@ -23,7 +23,7 @@
</ImageInstall>
<UserData>
<ProductKey>
<Key>8PTT6-RNW4C-6V7J2-C2D3X-MHBPB</Key>
<Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</Key>
</ProductKey>
<AcceptEula>true</AcceptEula>
</UserData>
@ -62,6 +62,10 @@
</settings>
<settings pass="generalize"></settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<ComputerName>TEMPNAME</ComputerName>
<TimeZone>Central Standard Time</TimeZone>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
@ -86,9 +90,6 @@
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<TimeZone>Central Standard Time</TimeZone>
</component>
</settings>
<settings pass="auditSystem"></settings>
<settings pass="auditUser"></settings>
@ -158,6 +159,41 @@ foreach( $file in $Document.unattend.Extensions.File ) {
}
}
</ExtractScript>
<File path="C:\Windows\Setup\Scripts\GetComputerName.ps1" transformation="Text">
return Read-Host -Prompt 'Enter computer name';
</File>
<File path="C:\Windows\Setup\Scripts\SetComputerName.ps1" transformation="Text">
$ErrorActionPreference = 'Stop';
Set-StrictMode -Version 'Latest';
&amp; {
$newName = ( Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\ComputerName.txt' -Raw ).Trim();
if( [string]::IsNullOrWhitespace( $newName ) ) {
throw "No computer name was provided.";
}
$keys = @(
@{
LiteralPath = 'Registry::HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName';
Name = 'ComputerName';
};
@{
LiteralPath = 'Registry::HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters';
Name = 'Hostname';
};
@{
LiteralPath = 'Registry::HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters';
Name = 'NV Hostname';
};
);
while( $true ) {
foreach( $key in $keys ) {
Set-ItemProperty @key -Type 'String' -Value $newName;
}
Start-Sleep -Milliseconds 50;
}
} *&gt;&amp;1 &gt;&gt; 'C:\Windows\Setup\Scripts\SetComputerName.log';
</File>
<File path="C:\Windows\Setup\Scripts\RemovePackages.ps1" transformation="Text">
$selectors = @(
'Microsoft.Microsoft3DViewer';
@ -181,10 +217,12 @@ $selectors = @(
'Microsoft.OutlookForWindows';
'Microsoft.MSPaint';
'Microsoft.People';
'Microsoft.Windows.Photos';
'Microsoft.PowerAutomateDesktop';
'MicrosoftCorporationII.QuickAssist';
'Microsoft.SkypeApp';
'Microsoft.MicrosoftSolitaireCollection';
'Microsoft.MicrosoftStickyNotes';
'MicrosoftTeams';
'MSTeams';
'Microsoft.Todos';
@ -517,6 +555,11 @@ C:\Scripts\TCSE-Computer-Deploy.bat
</File>
<File path="C:\Windows\Setup\Scripts\Specialize.ps1" transformation="Text">
$scripts = @(
{
Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\GetComputerName.ps1' -Raw | Invoke-Expression &gt; 'C:\Windows\Setup\Scripts\ComputerName.txt';
Start-Process -FilePath ( Get-Process -Id $PID ).Path -ArgumentList '-NoProfile', '-Command', 'Get-Content -LiteralPath "C:\Windows\Setup\Scripts\SetComputerName.ps1" -Raw | Invoke-Expression;' -WindowStyle 'Hidden';
Start-Sleep -Seconds 10;
};
{
reg.exe add "HKLM\SYSTEM\Setup\MoSetup" /v AllowUpgradesWithUnsupportedTPMOrCPU /t REG_DWORD /d 1 /f;
};

View File

@ -1,2 +0,0 @@
Start-Sleep -Seconds 1 # Adjust the delay as needed
Restart-Computer -Force

View File

@ -1,6 +0,0 @@
# Create a Scheduled Task to Run at System Startup
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-ExecutionPolicy Bypass -File C:\Scripts\GCPW\First-Boot-Force-Restart.ps1"
$trigger = New-ScheduledTaskTrigger -AtStartup
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "ForceRestartAfterNextBoot" -RunLevel Highest

View File

@ -1,25 +0,0 @@
# Get the Google Update folder path
$googleUpdateFolder = "C:\Program Files (x86)\Google\GoogleUpdater"
# Get all subfolders and extract version numbers
$subfolders = Get-ChildItem $googleUpdateFolder | Where-Object { $_.PSIsContainer -and $_.BaseName -match '\d+\.\d+\.\d+\.\d+' } | ForEach-Object {
[version]$_.BaseName
}
# Find the subfolder with the highest version number
$latestSubfolder = $subfolders | Sort-Object -Descending | Select-Object -First 1
if ($latestSubfolder) {
# Construct the full path to the updater.exe, ensuring proper quoting
$updaterPath = Join-Path $googleUpdateFolder $latestSubfolder
$updaterPath += "\updater.exe"
$quotedUpdaterPath = '"' + $updaterPath + '"'
# Create a new task with the updated path and a startup trigger
$newTaskName = "Update_Chrome_" + (Get-Date -Format "yyyyMMddHHmmss")
Register-ScheduledTask -TaskName $newTaskName -Action (New-ScheduledTaskAction -Execute $quotedUpdaterPath -Argument "--wake --system") -Trigger (New-JobTrigger -AtStartup) -Principal (New-ScheduledTaskPrincipal -UserId "SYSTEM" -RunLevel Highest)
Write-Host "New task '$newTaskName' created with startup trigger and updated path: $quotedUpdaterPath"
} else {
Write-Host "Google Update folder or updater.exe not found."
}

View File

@ -1,29 +0,0 @@
# Prompt the user for device type
$deviceType = Read-Host "Is the device a Desktop (1) or Laptop (2)?"
# Validate the device type input
while ($deviceType -notin 1, 2) {
Write-Warning "Invalid input. Please enter 1 for Desktop or 2 for Laptop."
$deviceType = Read-Host "Is the device a Desktop (1) or Laptop (2)?"
}
# Prompt the user for the device ID
$deviceId = Read-Host "Enter the device ID number:"
# Construct the new computer name based on device type and ID
$newComputerName = if ($deviceType -eq 1) {
"DESKTOP-$deviceId"
} else {
"LAPTOP-$deviceId"
}
# Check if the computer with the new name already exists using WMI
$existingComputer = Get-WmiObject -Class Win32_ComputerSystem -Filter "Name='$newComputerName'"
if ($existingComputer) {
Write-Warning "A computer with the name '$newComputerName' already exists. Please choose a different ID."
} else {
# Rename the computer
Rename-Computer -NewName $newComputerName -Force
Write-Host "Computer renamed successfully to: $newComputerName"
}

View File

@ -11,7 +11,6 @@ powershell -ExecutionPolicy Bypass -File "C:\Scripts\Printers\01-Printer-Scripts
:: Install Google Chrome Enterprise & Accept Winget Terms
echo Installing Google Chrome...
:: C:\Users\Tech\AppData\Local\Microsoft\WindowsApps\winget.exe install Google.Chrome -h -s winget
winget install --exact --id Google.Chrome --silent --accept-source-agreements --accept-package-agreements
:: Install Google Cloud Provider for Windows
@ -26,22 +25,22 @@ echo TCSE Remote MeshCentral Installed...
:: Install Google Drive
echo Installing Google Drive...
:: C:\Users\Tech\AppData\Local\Microsoft\WindowsApps\winget.exe install Google.GoogleDrive -h -s winget
winget install --exact --id Google.GoogleDrive --silent
:: Install VLC Media Player
echo Installing VLC Media Player...
:: C:\Users\Tech\AppData\Local\Microsoft\WindowsApps\winget.exe install VideoLAN.VLC -h -s winget
winget install --exact --id VideoLAN.VLC --silent
:: Install ImageGlass Image Viewer
echo Installing ImageGlass...
winget install --exact --id DuongDieuPhap.ImageGlass --silent
:: Install Zoom
echo Installing Zoom...
:: C:\Users\Tech\AppData\Local\Microsoft\WindowsApps\winget.exe install Zoom.Zoom -h -s winget
winget install --exact --id Zoom.Zoom --silent
:: Install Adobe Reader
echo Installing Adobe Reader...
:: C:\Users\Tech\AppData\Local\Microsoft\WindowsApps\winget.exe install Adobe.Acrobat.Reader.64-bit -h -s winget
winget install --exact --id Adobe.Acrobat.Reader.64-bit --silent
:: Run Debloat Script
@ -81,37 +80,21 @@ for %%F in ("%PUBLIC_DESKTOP%\*.lnk") do (
:: Display results
echo Deleted !deleted_count! shortcut(s) from the Public Desktop.
:: Install Google Cloud Provider for Windows - Second Time
:: echo Installing Google Cloud Provider for Windows Second Time...
:: C:\Scripts\Software\gcpwstandaloneenterprise64.exe /silent /fullinstall
:: echo Google Cloud Provider for Windows Installed Second Time...
:: Add Scheduled Tasks to Force GCPW Update
:: echo Run Google Updater...
:: powershell -ExecutionPolicy Bypass -File "C:\Scripts\GCPW\Run-Google-Updater.ps1"
:: echo Run Create First Boot Restart Task...
:: powershell -ExecutionPolicy Bypass -File "C:\Scripts\GCPW\First-Boot-Restart-Task.ps1"
:: Install Google Cloud Provider for Windows - Third Time
:: echo Installing Google Cloud Provider for Windows Second Time...
:: 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"
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Patches\GCPW\GCPW-AllowDomains.ps1"
echo Allowed Domain Added to Registry...
:: Apply Local Group Policy
echo Adding Group Policy to All Users...
C:\Scripts\Patches\GroupPolicy\LGPO.exe /g C:\Scripts\Patches\GroupPolicy\
echo Successfully Applied Policy...
:: 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'
echo Successfully Copied Login Scripts...
:: Apply Local Group Policy
echo Adding Group Policy to All Users...
C:\Scripts\GroupPolicy\LGPO.exe /g C:\Scripts\GroupPolicy\
echo Successfully Applied Policy...
:: Restart System
echo Restarting system in 2.5 minutes...
timeout /t 150