From 8de4a8bab9a8581f76836de14de89bd437b298a3 Mon Sep 17 00:00:00 2001 From: Nick Kulmanovsky Date: Tue, 14 Jan 2025 15:30:20 -0800 Subject: [PATCH] initial commit --- provision.ps1 | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 provision.ps1 diff --git a/provision.ps1 b/provision.ps1 new file mode 100644 index 0000000..fe814e9 --- /dev/null +++ b/provision.ps1 @@ -0,0 +1,88 @@ +# Description: Boxstarter Script +# Run START https://boxstarter.org/package/url? + +#------------------------------------------------------------------------------ +# TEMPORARY +#------------------------------------------------------------------------------ + +if (Test-Path -Path "C:\Users\_LocalAdmin\domain_creds.xml") { + Write-Host "domain_creds.xml exists...continuing" + } else { + $domainCred = Get-Credential -Message "Enter domain username and password" + $domainCred | Export-CliXml -Path "C:\Users\_LocalAdmin\domain_creds.xml" + } + + Disable-UAC + + # #------------------------------------------------------------------------------ + # # Software + # #------------------------------------------------------------------------------ + + choco source add --name=internal_machine --source=https://chocolatey.washoetribe.net/chocolatey + + if (Test-Path "C:\Users\_LocalAdmin\file.txt"){ + Write-Host "file.txt exists...Continuing" + } else { + Read-Host "Is this a Standard, Dental, PRC, Front Desk, or Laptop computer?" | Out-File "C:\Users\_LocalAdmin\file.txt" + $content = Get-Content "C:\Users\_LocalAdmin\file.txt" + $useCases = @("Standard", "Dental", "PRC", "Front Desk", "Laptop") + + while ($useCases -notcontains $content){ + Read-Host "Is this a Standard, Dental, PRC, Front Desk, or Laptop computer?" | Out-File "C:\Users\_LocalAdmin\file.txt" + $content = Get-Content "C:\Users\_LocalAdmin\file.txt" + } + } + + if ($content -eq "Dental"){ + choco install --source=https://chocolatey.washoetribe.net/chocolatey -y satellite + } + + if ($content -eq "PRC"){ + choco install --source=https://chocolatey.washoetribe.net/chocolatey -y secure-crt + } + + if ($content -eq "Front Desk"){ + choco install --source=https://chocolatey.washoetribe.net/chocolatey -y sigplus + } + + if ($content -eq "Laptop"){ + choco install --source=https://chocolatey.washoetribe.net/chocolatey -y fortinet-vpn-client + } + + $baseApplications = @( + "chrome", + "citrix", + "yubikey", + "new-teams", + "tactical-agent", + "team-alert", + "wazuh-agent", + "UniTwain" + ); + + foreach ($app in $baseApplications) { + choco install --source=https://chocolatey.washoetribe.net/chocolatey -y $app + } + + #------------------------------------------------------------------------------ + # Windows Updates + #------------------------------------------------------------------------------ + + Enable-UAC + Enable-MicrosoftUpdate + Install-WindowsUpdate -acceptEula + + # #------------------------------------------------------------------------------ + # # Upgrade choco client + # #------------------------------------------------------------------------------ + + choco upgrade chocolatey -y + + # #------------------------------------------------------------------------------ + # # Active Directory + # #------------------------------------------------------------------------------ + + $loadedCred = Import-CliXml -Path "C:\Users\_LocalAdmin\domain_creds.xml" + Add-Computer -DomainName wtmed.washoetribe.net -OUPath "OU=Test,OU=Computers,OU=WT MED CLINIC,DC=wtmed,DC=washoetribe,DC=net" -credential $loadedCred + rm C:\Users\_LocalAdmin\domain_creds.xml + rm C:\Users\_LocalAdmin\file.txt \ No newline at end of file