![]() Write-Host "Exception inside running script->",$_.Exception. Start-ScheduledTask -TaskName "RestartChromeApp" -Verbose $reg= Register-ScheduledTask 'RestartChromeApp' -InputObject $task For Await final configuration, your options are: Yes: Enable a locked experience at the end of Setup Assistant to ensure your most critical device configuration policies are installed on the device. $task = New-ScheduledTask -Action $actions -Principal $principal -Settings $settings If you selected Allow Apple Configurator by certificate in the previous step, choose an Apple Configurator certificate to import. $settings = New-ScheduledTaskSettingsSet -WakeToRun -DontStopIfGoingOnBatteries -DontStopOnIdleEnd -Hidden -AllowStartIfOnBatteries -Priority 0 -StartWhenAvailable $principal = New-ScheduledTaskPrincipal -UserId $currentLoggedInuser -RunLevel Highest $actions = (New-ScheduledTaskAction -Execute 'powershell.exe' -Argument "-ExecutionPolicy unrestricted -WindowStyle Hidden -NoLogo -File C:\Hexnode\Logs\Script.ps1") Prepare Devices (Options ticked: Add to DEP, Active and complete enrolment, Allow devices to pair) - Select Meraki Server above - Select new Organisation (Log on with our Apple DEP / Administrator account): No issue. Write-Host "error while unregistering sheduletask->",$_.Exception.Message $a=Unregister-ScheduledTask -TaskName "RestartChromeApp" -Confirm:$false -ErrorAction:Ignore #unregistering UninstallDesktopAppTask task from task scheduler (if we have already registered using script execution) Set-Content -Path C:\Hexnode\Logs\Script.ps1 -Value $script Write-Host "scheduling task for user: ",$currentLoggedInuser Enter a descriptive name, then double-click the template to open it ( Figure A ). Write-Host "cannot find any logged in user, so skipping script execution`nTo execute this script, atleast one user must be logged-in to the device" Click on File New Blueprint to launch the blueprint template. ![]() $isactive = C:\windows\system32\qwinsta.exe $user $signedInUsers=get-wmiobject win32_process | where-object ) Once your device reboots and connects to the Network, you will see a Remote Configuration Screen, click Next. Choose the filter type as Source and then select Manually Added >. No credentials are needed for Automated Enrollment Credentials, click Prepare. Sign in to Apple Business Manager (ABM) / Apple School Manager (ASM). Start-Process -FilePath "C:\Program Files\Google\Chrome\Application\chrome.exe" -WorkingDirectory "C:\Program the current logged in user (Optional): Choose Network Profile and click Next. $script = -Name "chrome" -ErrorAction Silentlåontinue | Stop-Process -Force
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |