ICT IGCSE year 10 links
Set-ExecutionPolicy RemoteSigned -Scope LocalMachine
SchoolSetup.ps1
.\SchoolSetup.ps1
############################################
# CREATE ADMIN ACCOUNT
############################################
$AdminUsername = "SchoolAdmin"
$AdminPassword = ConvertTo-SecureString "Admin@1234" -AsPlainText -Force
New-LocalUser -Name $AdminUsername -Password $AdminPassword -FullName "School Administrator" -Description "Administrative Account"
Add-LocalGroupMember -Group "Administrators" -Member $AdminUsername
############################################
# CREATE RESTRICTED STUDENT ACCOUNT
############################################
$GuestUsername = "StudentGuest"
$GuestPassword = ConvertTo-SecureString "Guest@123" -AsPlainText -Force
New-LocalUser -Name $GuestUsername -Password $GuestPassword -FullName "Student Guest Account" -Description "Restricted student account"
Add-LocalGroupMember -Group "Users" -Member $GuestUsername
Remove-LocalGroupMember -Group "Administrators" -Member $GuestUsername -ErrorAction SilentlyContinue
############################################
# BLOCK SOFTWARE INSTALLATION (NON-ADMINS)
############################################
reg add "HKLM\Software\Policies\Microsoft\Windows\Installer" /v DisableMSI /t REG_DWORD /d 1 /f
############################################
# BLOCK MICROSOFT STORE INSTALLS
############################################
reg add "HKLM\Software\Policies\Microsoft\WindowsStore" /v RemoveWindowsStore /t REG_DWORD /d 1 /f
############################################
# REMOVE ROBLOX & ROBLOX STUDIO
############################################
Write-Host "Removing Roblox if installed..."
$RobloxPaths = @(
"$env:LOCALAPPDATA\Roblox",
"$env:ProgramFiles\Roblox",
"$env:ProgramFiles(x86)\Roblox",
"$env:LOCALAPPDATA\RobloxStudio"
)
foreach ($path in $RobloxPaths) {
if (Test-Path $path) {
Remove-Item -Recurse -Force -Path $path
}
}
############################################
# BLOCK ROBLOX & GAMING WEBSITES
############################################
$hostsPath = "C:\Windows\System32\drivers\etc\hosts"
Add-Content -Path $hostsPath -Value "`n# School network game blocks"
Add-Content -Path $hostsPath -Value "127.0.0.1 roblox.com"
Add-Content -Path $hostsPath -Value "127.0.0.1 www.roblox.com"
Add-Content -Path $hostsPath -Value "127.0.0.1 web.roblox.com"
Add-Content -Path $hostsPath -Value "127.0.0.1 epicgames.com"
Add-Content -Path $hostsPath -Value "127.0.0.1 www.epicgames.com"
Add-Content -Path $hostsPath -Value "127.0.0.1 store.epicgames.com"
Add-Content -Path $hostsPath -Value "127.0.0.1 steampowered.com"
Add-Content -Path $hostsPath -Value "127.0.0.1 store.steampowered.com"
Add-Content -Path $hostsPath -Value "127.0.0.1 steamcommunity.com"
############################################
# FINISHED
############################################
Write-Host "✔ School Admin account created"
Write-Host "✔ Student account locked down"
Write-Host "✔ Software installation blocked"
Write-Host "✔ Roblox and game sites blocked"
Write-Host "SETUP COMPLETE"
.png)

.png)
.png)

