EUM-Autopilot.ps1
|
<#PSScriptInfo .VERSION 1.0.1 .GUID 7effa3e9-3fc8-45f3-a164-838615c99506 .AUTHOR Bicer .COMPANYNAME .COPYRIGHT .TAGS .LICENSEURI .PROJECTURI .ICONURI .EXTERNALMODULEDEPENDENCIES .REQUIREDSCRIPTS .EXTERNALSCRIPTDEPENDENCIES .RELEASENOTES #> <# .DESCRIPTION Automates Windows Autopilot deployment tasks #> # Define the list of options $choices = @("NB", "CR", "PC", "MR") # Display the options to the user Write-Host "Choose a group type from the following options:" for ($i = 0; $i -lt $choices.Count; $i++) { Write-Host "$($i+1): $($choices[$i])" } # Prompt the user to enter their choice $selectionIndex = [int](Read-Host "Enter the number corresponding to your choice") # Validate the selection if ($selectionIndex -gt 0 -and $selectionIndex -le $choices.Count) { $selection = $choices[$selectionIndex - 1] $GroupName = "Win11-Autopilot$selection" Write-Host "Group Name set to: $GroupName" } else { Write-Host "Invalid selection. Exiting script." exit } # Rest of the script Set-ExecutionPolicy Bypass -Scope Process -Force Install-Script -Name Get-WindowsAutoPilotInfo -Force Get-WindowsAutoPilotInfo -Online -AddToGroup $GroupName -Assign |