Forum Discussion

Sk-73's avatar
Sk-73
Iron Contributor
Dec 09, 2021
Solved

Microsoft Intune Auto Pilot Command for OOBE

Dear all,   Does anyone know how to combine the below command as a bat file?   Type in PowerShell Type in Set-ExecutionPolicy bypass Type in Install-Script -Name get-WindowsAutoPilotInfo -Force...
  • Harm_Veenstra's avatar
    Dec 16, 2021
    Build a script containing something like below and create a cmd/bat file containing "powershell.exe -executionpolicy bypass -file .\name-of-script.ps1"

    Name-of-script.ps1
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    Install-PackageProvider NuGet -MinimumVersion 2.8.5.201 -Force | Out-Null
    Set-PSRepository PSGallery -InstallationPolicy Trusted
    Install-Script -Name get-WindowsAutoPilotInfo -Force
    Get-WindowsAutoPilotInfo.ps1 -Online

Resources