Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Script:
@echo off
REM This script is used to import devices into Autopilot using the -online switch
REM Ensure PowerShell is available
where /q powershell
if %errorlevel% neq 0 (
echo PowerShell is not installed. Please install PowerShell to continue.
exit /b 1
)
REM Run the PowerShell script with -online switch
powershell -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -Command ""Install-Script -Name Import-AutopilotDevice -Force; Import-AutopilotDevice -online""' -Verb RunAs}"
echo Script execution completed. Check the output for any errors.
pause
Como Executar o Script:
1. Abra o Bloco de Notas no Windows.
2. Copie o código do script acima e cole no Bloco de Notas.
3. Salve o arquivo com a extensão .bat
, por exemplo, ImportAutopilotDevice.bat
.
4. Clique com o botão direito no arquivo .bat
salvo e selecione "Executar como administrador".
5. O script abrirá o PowerShell e executará o comando necessário para importar dispositivos no Autopilot usando o switch -online
.
6. Siga as instruções na tela para fornecer suas credenciais do Intune quando solicitado.