Created
April 26, 2018 12:44
-
-
Save chrisvasey/145aa2ff3cecd3dd9a3024194822966b to your computer and use it in GitHub Desktop.
LLPR Build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If the script won't run try pasting this into the console: Set-ExecutionPolicy unrestricted | |
echo "Starting script" | |
$officeNeeded = "" | |
while ($officeNeeded -notmatch "[y|n]"){ | |
$device = read-host "Do you want to install Office2016? (Y/N)" | |
} | |
Function InstallOffice | |
{ | |
# Install AV | |
echo "Now installing Office 2010. You may need to press enter once completed to prompt activation" | |
choco install -y "office2010.1.0.0.nupkg" | |
} | |
echo "Checking if choco package manager is installed" | |
try {choco} | |
catch { | |
echo "Choco not installed, installing." | |
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))} | |
if (!$error) { | |
echo "Choco is installed, moving on."<#;exit#> | |
} | |
# Install apps | |
echo "Installing standard packages" | |
echo "Installing packages" | |
choco install -y "packages.config" | |
#NEED TO ADD THESE APPS TO PACKAGES | |
#Office | |
#Gotoassist | |
#Esset | |
# Install update | |
echo "updating existing apps" | |
cup all -y | |
# Ask if you want to install office | |
if ($officeNeeded -eq "y"){ | |
write-host "Installing Office2016" | |
$officeNeeded = "Yes"; | |
InstallOffice | |
} | |
# Remove windows 10 apps | |
echo "Removing Windows 10 apps" | |
echo "Checking if is Windows 10" | |
$error.clear() | |
try {Get-AppxPackage} | |
catch { "Is not Windows 10, skipping" } | |
if (!$error) { | |
echo "removing Windows 10 apps" | |
Get-AppxPackage *3dbuilder* | Remove-AppxPackage | |
Get-AppxPackage *windowsalarms* | Remove-AppxPackage | |
Get-AppxPackage *windowscalculator* | Remove-AppxPackage | |
Get-AppxPackage *windowscommunicationsapps* | Remove-AppxPackage | |
Get-AppxPackage *windowscamera* | Remove-AppxPackage | |
Get-AppxPackage *officehub* | Remove-AppxPackage | |
Get-AppxPackage *skypeapp* | Remove-AppxPackage | |
Get-AppxPackage *getstarted* | Remove-AppxPackage | |
Get-AppxPackage *zunemusic* | Remove-AppxPackage | |
Get-AppxPackage *windowsmaps* | Remove-AppxPackage | |
Get-AppxPackage *solitairecollection* | Remove-AppxPackage | |
Get-AppxPackage *bingfinance* | Remove-AppxPackage | |
Get-AppxPackage *zunevideo* | Remove-AppxPackage | |
Get-AppxPackage *bingnews* | Remove-AppxPackage | |
Get-AppxPackage *onenote* | Remove-AppxPackage | |
Get-AppxPackage *windowsphone* | Remove-AppxPackage | |
Get-AppxPackage *windowsstore* | Remove-AppxPackage | |
Get-AppxPackage *bingsports* | Remove-AppxPackage | |
Get-AppxPackage *soundrecorder* | Remove-AppxPackage | |
Get-AppxPackage *bingweather* | Remove-AppxPackage | |
Get-AppxPackage *xboxapp* | Remove-AppxPackage | |
Get-AppxPackage *Microsoft.MicrosoftOfficeHub* | Remove-AppxPackage | |
Get-AppxPackage *Microsoft.Office.Desktop* | Remove-AppxPackage | |
Get-AppxPackage *Microsoft.Office.OneNote* | Remove-AppxPackage | |
} | |
InstallOffice | |
echo "All done! Now you just need to configure mocha and log the user in" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment