commit
|
Before Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 217 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 156 KiB |
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 200 KiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
@@ -0,0 +1,32 @@
|
|||||||
|
# ==============================
|
||||||
|
# Windows Autopilot Online Upload Script
|
||||||
|
# No GroupTag
|
||||||
|
# ==============================
|
||||||
|
|
||||||
|
Write-Host "Starting Windows Autopilot registration..." -ForegroundColor Cyan
|
||||||
|
|
||||||
|
# Force TLS 1.2 (avoids PSGallery errors)
|
||||||
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||||
|
|
||||||
|
# Temporarily bypass execution policy (session only)
|
||||||
|
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||||
|
|
||||||
|
# Install NuGet silently if missing
|
||||||
|
if (!(Get-PackageProvider -Name NuGet -ErrorAction SilentlyContinue)) {
|
||||||
|
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
# Trust PSGallery to avoid confirmation prompts
|
||||||
|
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
|
||||||
|
|
||||||
|
# Install Get-WindowsAutoPilotInfo if not already installed
|
||||||
|
if (!(Get-Command Get-WindowsAutoPilotInfo.ps1 -ErrorAction SilentlyContinue)) {
|
||||||
|
Install-Script -Name Get-WindowsAutoPilotInfo -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Generating and uploading hardware hash..." -ForegroundColor Yellow
|
||||||
|
|
||||||
|
# Upload to tenant (login required)
|
||||||
|
Get-WindowsAutoPilotInfo.ps1 -Online
|
||||||
|
|
||||||
|
Write-Host "Autopilot registration completed." -ForegroundColor Green
|
||||||