-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstudent.ps1
More file actions
81 lines (60 loc) · 2.42 KB
/
student.ps1
File metadata and controls
81 lines (60 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# -------------------------------------------------------------------------------------
# Script : Laptop provisioning script - Admin Side
# Author : Raven Limadinata (JAC IT Team)
# Date : 2024/02/27
# Rev. : 1.0.2
# Comments : Provisions a laptop by performing various tasks to standardize the laptop
# configuration. To be run on the student user.
# Dependency: [CFG] collection/packages.config -> A list of software to install.
# -------------------------------------------------------------------------------------
Write-Host "JAC SCHOOL IT TEAM | LAPTOP PROVISIONING SCRIPT | v1.0.2 | Student Side" -ForegroundColor Magenta
Write-Host "Starting Laptop Provisioning Script..."
# =====================
# Dependency checks
# =====================
Write-Host "Checking dependencies..."
# ::::::::::::::::::::::::::::::::
# Check collection/packages.config
# ::::::::::::::::::::::::::::::::
Write-Host "Choco install manifest: " -NoNewline
if (!(Test-Path "collection/packages.config")) {
Write-Host "Missing!" -ForegroundColor Red
Exit
}
else {
Write-Host "OK." -ForegroundColor Green
}
# ::::::::::::::::::::::::::::::::
# ================
# Main Process
# ================
# ::::::::::::::::::::::::::::::::::
# Remove Windows Store on student side
# ::::::::::::::::::::::::::::::::::
Write-Host "Removing Microsoft Store (Student)"
Get-AppxPackage *windowsstore* | Remove-AppxPackage
Write-Host "Microsoft Store removed!"
# ::::::::::::::::::::::::::::::::::
# :::::::::::::::::::::::::::::::::
# Setup Microsoft Defender Settings
# :::::::::::::::::::::::::::::::::
Set-MpPreference -QuarantinePurgeItemsAfterDelay 30
Set-MpPreference -ScanScheduleQuickScanTime 06:45:00
# :::::::::::::::::::::::::::::::::
# ::::::::::::::::::::::::::::::::::::::::::::::
# Install essential software package using choco
# ::::::::::::::::::::::::::::::::::::::::::::::
Write-Host "Installing essential software package via choco"
choco install collection/packages.config --yes
Write-Host "Choco bulk install done!"
# ::::::::::::::::::::::::::::::::::::::::::::::
# ::::::::::::::::::::::::::::
# Run network filtering script
# ::::::::::::::::::::::::::::
Write-Host "Running network filtering script..."
Start-Process -FilePath "$PSScriptRoot\collection\network.ps1" -Wait
Write-Host "Network filtering script executed!"
# =======
# END
# =======
Write-Host "Student-side laptop provisioning process is done!"