InitalCommit
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.exe
|
||||
53
DeployTools/Deploy-FirstBoot.ps1
Normal file
53
DeployTools/Deploy-FirstBoot.ps1
Normal file
@@ -0,0 +1,53 @@
|
||||
###############################################################
|
||||
# @description: #
|
||||
# Used when image get cloned to new system #
|
||||
# For Checking activation status, Setting SystemName, #
|
||||
# running updates for Chocolatry apps and Windows Updates #
|
||||
# #
|
||||
# @project: IMGSystTools #
|
||||
# @author: Bram Prieshof #
|
||||
###############################################################
|
||||
|
||||
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
|
||||
if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
|
||||
$CommandLine = $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
|
||||
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList " Set-ExecutionPolicy -Scope Process Unrestricted -Force; $CommandLine"
|
||||
Exit
|
||||
}
|
||||
}
|
||||
|
||||
Write-Output "Checking activation status..."
|
||||
$ta = Get-CimInstance -ClassName SoftwareLicensingProduct -Filter "PartialProductKey IS NOT NULL" | Where-Object -Property Name -Like "Windows*"
|
||||
if ($ta.LicenseStatus -eq 1) {Write-Outpute-Output "Activation [OK]"} else {Write-Output "Activation [Error, Opening settings]";Start-Process "ms-settings:activation"; pause }
|
||||
|
||||
Write-Output "Getting System name"
|
||||
$sysid = Read-Host -Prompt 'Please enter system ID (example: DT001)'
|
||||
Rename-Computer -NewName $sysid
|
||||
Write-Output "System name [OK]"
|
||||
|
||||
|
||||
Write-Output "Checking Chocolatey package updates"
|
||||
choco upgrade -y all
|
||||
Write-Output " Chocolatey updates [OK]"
|
||||
|
||||
Write-Output "Checking Windows updates"
|
||||
Import-Module PSWindowsUpdate
|
||||
Get-WUInstall -MicrosoftUpdate -AcceptAll -IgnoreReboot -IgnoreRebootRequired -Install
|
||||
Write-Output " Windows updates [OK]"
|
||||
|
||||
#Removing Created Shortcuts
|
||||
Remove-Item C:\Users\Public\Desktop\*.lnk
|
||||
|
||||
#Remove "Run on login script" if exists
|
||||
if (Test-Path "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\FirstBoot.lnk" -PathType leaf)
|
||||
{Remove-Item "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\FirstBoot.lnk"}
|
||||
|
||||
#Finalizing and reboot
|
||||
Write-Output ""
|
||||
Write-Output ""
|
||||
Write-Output "The System deployed successfully, but it needs to be rebooted"
|
||||
|
||||
$confirmation = Read-Host "Do you want to do that now? y/N:"
|
||||
if ($confirmation -eq 'y') {
|
||||
Restart-Computer -Force
|
||||
}
|
||||
21
DeployTools/Enable_Deploy-FirstBoot.cmd
Normal file
21
DeployTools/Enable_Deploy-FirstBoot.cmd
Normal file
@@ -0,0 +1,21 @@
|
||||
@echo off
|
||||
|
||||
REM ###############################################################
|
||||
REM # @description: #
|
||||
REM # Used for enableing "Deploy-FirstBoot.ps1" on next boot #
|
||||
REM # #
|
||||
REM # @project: IMGSystTools #
|
||||
REM # @author: Bram Prieshof #
|
||||
REM ###############################################################
|
||||
|
||||
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
COPY "C:\SysTools\DeployTools\INK_KickStart_Deploy-FirstBoot.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\FirstBoot.lnk"
|
||||
ECHO Enabled FirstBoot Deploy script
|
||||
PAUSE
|
||||
) ELSE (
|
||||
ECHO Please run this script as administrator
|
||||
PAUSE
|
||||
)
|
||||
|
||||
BIN
DeployTools/INK_KickStart_Deploy-FirstBoot.lnk
Normal file
BIN
DeployTools/INK_KickStart_Deploy-FirstBoot.lnk
Normal file
Binary file not shown.
13
DeployTools/KickStart_Deploy-FirstBoot.cmd
Normal file
13
DeployTools/KickStart_Deploy-FirstBoot.cmd
Normal file
@@ -0,0 +1,13 @@
|
||||
@echo off
|
||||
|
||||
REM ###################################################
|
||||
REM # @description: #
|
||||
REM # Opens Deploy-FirstBoot.ps1 in powershell with #
|
||||
REM # Process ExecutionPolicy set to Unrestricted #
|
||||
REM # #
|
||||
REM # @project: IMGSystTools #
|
||||
REM # @author: Bram Prieshof #
|
||||
REM ###################################################
|
||||
|
||||
echo Starting deployment script...
|
||||
PowerShell.exe "Set-ExecutionPolicy -Scope Process Unrestricted -Force; C:\SysTools\DeployTools\Deploy-FirstBoot.ps1"
|
||||
1
InstallTools/Choco-PKGS.list
Normal file
1
InstallTools/Choco-PKGS.list
Normal file
@@ -0,0 +1 @@
|
||||
7zip bulk-crap-uninstaller caesium.install firefox gimp handbrake inkscape libreoffice-fresh notepadplusplus paint.net pdfsam.install pnggauntlet.install vlc vscode.install xnconvert.install choco install googlechrome pswindowsupdate git
|
||||
15
InstallTools/Download-OandO-Tools.cmd
Normal file
15
InstallTools/Download-OandO-Tools.cmd
Normal file
@@ -0,0 +1,15 @@
|
||||
@echo off
|
||||
REM ###################################################
|
||||
REM # @description: #
|
||||
REM # Download O&O Shutup 10 and App buster #
|
||||
REM # These tools are used for setting up the image #
|
||||
REM # #
|
||||
REM # @project: IMGSystTools #
|
||||
REM # @author: Bram Prieshof #
|
||||
REM ###################################################
|
||||
|
||||
PowerShell.exe "Invoke-WebRequest -UseBasicParsing -Uri https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe -OutFile C:\SysTools\InstallTools\OOSU10.exe; Invoke-WebRequest -UseBasicParsing -Uri https://dl5.oo-software.com/files/ooappbuster/OOAPB.exe -OutFile C:\SysTools\InstallTools\OOAPB.exe.exe"
|
||||
echo Downlaod [OK]
|
||||
pause
|
||||
|
||||
|
||||
21
InstallTools/Install-Chocolatey.cmd
Normal file
21
InstallTools/Install-Chocolatey.cmd
Normal file
@@ -0,0 +1,21 @@
|
||||
@echo off
|
||||
|
||||
REM #############################################################
|
||||
REM # @description: #
|
||||
REM # Downloads and install Chocolatry #
|
||||
REM # This tools is used for installing and managing software #
|
||||
REM # #
|
||||
REM # @project: IMGSystTools #
|
||||
REM # @author: Bram Prieshof #
|
||||
REM #############################################################
|
||||
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
PowerShell.exe "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"
|
||||
ECHO Chocolatey installed
|
||||
PAUSE
|
||||
) ELSE (
|
||||
ECHO Please run this script as administrator
|
||||
PAUSE
|
||||
)
|
||||
|
||||
24
InstallTools/Install-From-Choco-PKGSlist.cmd
Normal file
24
InstallTools/Install-From-Choco-PKGSlist.cmd
Normal file
@@ -0,0 +1,24 @@
|
||||
@echo off
|
||||
|
||||
REM #############################################################
|
||||
REM # @description: #
|
||||
REM # Installes software listed in Choco-PGKS.list #
|
||||
REM # using the Chocolatry package manager #
|
||||
REM # #
|
||||
REM # @project: IMGSystTools #
|
||||
REM # @author: Bram Prieshof #
|
||||
REM #############################################################
|
||||
|
||||
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
echo Install packages listed in Choco-PKGS.list
|
||||
pause
|
||||
PowerShell.exe "$content = [IO.File]::ReadAllText("C:\SysTools\InstallTools\Choco-PKGS.list"); choco install $content -y"
|
||||
echo Chocolatey installed
|
||||
pasue
|
||||
) ELSE (
|
||||
echo Please run this script as administrator
|
||||
pause
|
||||
)
|
||||
|
||||
20
InstallTools/Remove-AdobeNotificationClient.cmd
Normal file
20
InstallTools/Remove-AdobeNotificationClient.cmd
Normal file
@@ -0,0 +1,20 @@
|
||||
@echo off
|
||||
REM #######################################
|
||||
REM # @description: #
|
||||
REM # Removes AdobeNotificationClient #
|
||||
REM # Run this just before sysprep, #
|
||||
REM # since this app conflicts with it #
|
||||
REM # #
|
||||
REM # @project: IMGSystTools #
|
||||
REM # @author: Bram Prieshof #
|
||||
REM #######################################
|
||||
|
||||
NET SESSION >nul 2>&1
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
PowerShell.exe "Get-AppxPackage -AllUsers *AdobeNotificationClient* | Remove-AppxPackage -AllUsers"
|
||||
ECHO AdobeNotificationClient Removed
|
||||
PAUSE
|
||||
) ELSE (
|
||||
ECHO Please run this script as administrator
|
||||
PAUSE
|
||||
)
|
||||
13
ManagmentTools/KickStart_RunUpdates.cmd
Normal file
13
ManagmentTools/KickStart_RunUpdates.cmd
Normal file
@@ -0,0 +1,13 @@
|
||||
@echo off
|
||||
|
||||
REM ###################################################
|
||||
REM # @description: #
|
||||
REM # Opens RunUpdates.ps1 in powershell with #
|
||||
REM # Process ExecutionPolicy set to Unrestricted #
|
||||
REM # #
|
||||
REM # @project: IMGSystTools #
|
||||
REM # @author: Bram Prieshof #
|
||||
REM ###################################################
|
||||
|
||||
echo Starting Update script...
|
||||
PowerShell.exe "Set-ExecutionPolicy -Scope Process Unrestricted -Force; C:\SysTools\ManagmentTools\RunUpdates.ps1"
|
||||
BIN
ManagmentTools/RunUpdates for Apps & System.lnk
Normal file
BIN
ManagmentTools/RunUpdates for Apps & System.lnk
Normal file
Binary file not shown.
28
ManagmentTools/RunUpdates.ps1
Normal file
28
ManagmentTools/RunUpdates.ps1
Normal file
@@ -0,0 +1,28 @@
|
||||
######################################################################
|
||||
# @description: #
|
||||
# Used for running updates for Chocolatry apps and Windows Updates #
|
||||
# When the system is all-ready deployed #
|
||||
# #
|
||||
# @project: IMGSystTools #
|
||||
# @author: Bram Prieshof #
|
||||
######################################################################
|
||||
|
||||
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
|
||||
if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
|
||||
$CommandLine = $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
|
||||
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList " Set-ExecutionPolicy -Scope Process Unrestricted -Force; $CommandLine"
|
||||
Exit
|
||||
}
|
||||
}
|
||||
|
||||
Write-Output "Checking Chocolatey package updates"
|
||||
choco upgrade -y all
|
||||
Write-Output " Chocolatey updates [OK]"
|
||||
|
||||
Write-Output "Checking Windows updates"
|
||||
Import-Module PSWindowsUpdate
|
||||
Get-WUInstall -MicrosoftUpdate -AcceptAll -Install
|
||||
Write-Output " Windows updates [OK]"
|
||||
|
||||
#Removing Created Shortcuts
|
||||
Remove-Item C:\Users\Public\Desktop\*.lnk
|
||||
Reference in New Issue
Block a user