Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get-WindowsAutopilotInfo
#Create directory and set execution policy for the process
New-Item -Path C:\ -Name "Windows Autopilot" -Type Directory
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Unrestricted
Set-Location "C:\Windows Autopilot"
#Install the Windows Autopilot script
try {
Write-Output "Installing Windows Autopilot Info script"
Install-Script -Name Get-WindowsAutoPilotInfo -ErrorAction Stop
}
catch {
Write-Output "Could not install Windows Autopilot script"
Return 1
}
#Run the script and output the values to a CSV
Get-WindowsAutoPilotInfo.ps1 -OutputFile WindowsAutopilot.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment