Forum Discussion
SimonAllison
Jul 05, 2018Iron Contributor
Get-WindowsAutoPilotInfo - A quicker way...
Hi All Just a Tip from me to make it easier (if you got other ways, let me know, would be interested) Starting to deploy via Autopilot but first grabbing the information - so I am using ...
SanderKoop
Aug 07, 2024Copper Contributor
SimonAllison
Try this, if you have an admin account with access to Autopilot:
@echo off
ECHO Enabling WinRM
PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command "Enable-PSRemoting -SkipNetworkProfileCheck -Force"
echo WinRM enabled.
ECHO Get NuGet provider
PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command "Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.208 -Force"
ECHO Update PowerShellGet module
PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command "Install-Module -Name PowerShellGet -Force -AllowClobber"
ECHO Install Get-WindowsAutoPilotInfo.ps1 script
PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command "Install-Script -Name Get-WindowsAutoPilotInfo -Force"
ECHO Run Get-WindowsAutoPilotInfo.ps1 script
PowerShell -NoProfile -ExecutionPolicy Unrestricted -Command "& 'C:\Program Files\WindowsPowerShell\Scripts\Get-WindowsAutoPilotInfo.ps1' -Online -Assign"
:END
echo Script execution completed.
pause