Prep PC
Audit Mode
Shift+F10
C:\Windows\System32\Sysprep\sysprep.exe /audit /reboot
Of CTRL-SHIFT-F3 bij initiele installatie.
Updates
install-PackageProvider -Name NuGet -Force | Out-Null
Install-Module PSWindowsUpdate -Force
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Import-Module PSWindowsUpdate
Get-WindowsUpdate -MicrosoftUpdate -AcceptAll -Install -AutoReboot
Debloat + trial verwijderen
Software
3th Parties
iwr https://www.oniria.be/helpdesk/winget_oniria.json -OutFile $env:TEMP\winget.json; winget import -i $env:TEMP\winget.json --accept-package-agreements --accept-source-agreements
Office 365
# Config voor Microsoft 365 Gezin/Persoonlijk, Nederlands, stille installatie
@'
<Configuration>
<Add OfficeClientEdition="64" Channel="Current">
<Product ID="O365HomePremRetail">
<Language ID="nl-nl" />
</Product>
</Add>
<Display Level="None" AcceptEULA="TRUE" />
</Configuration>
'@ | Out-File $env:TEMP\office.xml -Encoding ascii
# Officiele setup ophalen en stil installeren
iwr https://officecdn.microsoft.com/pr/wsus/setup.exe -OutFile $env:TEMP\officesetup.exe
& $env:TEMP\officesetup.exe /configure $env:TEMP\office.xml
RustDesk
$dir = "C:\Program Files\ONIRIA"
New-Item -ItemType Directory -Force -Path $dir | Out-Null
$name = "rustdesk-host=ko.oniria.xyz,key=SV+PGRPRGc5IFKobp9bkvxIV4FIFMjjnLQFVUGj1qHQ=.exe"
iwr "https://www.oniria.be/helpdesk/$name" -OutFile "$dir\$name"
$ws = New-Object -ComObject WScript.Shell
$lnk = $ws.CreateShortcut("C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Remote Support ONIRIA.lnk")
$lnk.TargetPath = "$dir\$name"
$lnk.Save()
Pc hernoemen
Rename-Computer -NewName "..."
Settings
# --- Systeemherstel aan + eerste herstelpunt ---
Enable-ComputerRestore -Drive "C:\"
Checkpoint-Computer -Description "ONIRIA prep" -RestorePointCreationType MODIFY_SETTINGS
# --- Per-user instellingen in het Default-profiel (erft elke nieuwe gebruiker) ---
reg load HKLM\DefUser C:\Users\Default\NTUSER.DAT
# --- Bestandsextensies tonen
reg add "HKLM\DefUser\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
# --- Widgets-knop van taakbalk
reg add "HKLM\DefUser\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarDa /t REG_DWORD /d 0 /f
# --- Zoekbalk taakbalk: enkel icoon i.p.v. brede balk
reg add "HKLM\DefUser\Software\Microsoft\Windows\CurrentVersion\Search" /v SearchboxTaskbarMode /t REG_DWORD /d 1 /f
# --- Bing-resultaten uit startmenu-zoeken
reg add "HKLM\DefUser\Software\Microsoft\Windows\CurrentVersion\Search" /v BingSearchEnabled /t REG_DWORD /d 0 /f
reg unload HKLM\DefUser
# --- NumLock aan op aanmeldscherm ---
reg add "HKU\.DEFAULT\Control Panel\Keyboard" /v InitialKeyboardIndicators /t REG_SZ /d 2 /f
# --- Energie: scherm 15 min, slaapstand 30 min (netstroom) ---
powercfg /change monitor-timeout-ac 15
powercfg /change standby-timeout-ac 30
# --- Keyboard/invoertaal (Belgisch punt)
$list = New-WinUserLanguageList nl-BE
$list[0].InputMethodTips.Clear()
$list[0].InputMethodTips.Add('0813:00000813') # Belgisch (punt)
Set-WinUserLanguageList $list -Force
# --- Systeemtaal / regio / locale
Set-WinUILanguageOverride -Language nl-BE # UI-taal (vereist dat language pack geïnstalleerd is)
Set-WinSystemLocale nl-BE # systeemlocale (non-Unicode apps) — vereist reboot
Set-Culture nl-BE # datum/tijd/getalnotatie
Set-WinHomeLocation -GeoId 21 # regio: 21 = België
tzutil /s "Romance Standard Time"
Copy-UserInternationalSettingsToSystem -WelcomeScreen $true -NewUser $true
# --- Language pack
Install-Language nl-BE
GLPI-agent
$v=(irm https://api.github.com/repos/glpi-project/glpi-agent/releases/latest).tag_name; iwr "https://github.com/glpi-project/glpi-agent/releases/download/$v/GLPI-Agent-$v-x64.msi" -OutFile $env:TEMP\glpi-agent.msi; Start-Process msiexec -Wait -ArgumentList "/i $env:TEMP\glpi-agent.msi /quiet SERVER=https://helpdesk.oniria.xyz/ RUNNOW=1"
iwr http://localhost:62354/now -UseBasicParsing
Eventueel checken en update van agent naar server pushen?
- Lokaal: http://localhost:62354/ > Force an inventory
In GLPI: computer koppelen aan gebruiker
Afsluiten
C:\Windows\System32\Sysprep\sysprep.exe /oobe /shutdown
No comments to display
No comments to display