Update gp-mdm-sync.ps1
This commit is contained in:
@@ -9,3 +9,7 @@ gpupdate /force
|
||||
# Als laatste voer je dan de MDM Intune Policy sync uit, dit kan via de Synchronisatie knop in de company portal maar ook met de volgende commando om de hidden trigger te activeren uit de task scheduler
|
||||
|
||||
Get-ScheduledTask | ? {$_.TaskName -eq 'PushLaunch'} | Start-ScheduledTask
|
||||
|
||||
$EnrollmentID = Get-ScheduledTask | Where-Object { $_.TaskPath -like "*Microsoft*Windows*EnterpriseMgmt\*" } | Select-Object -ExpandProperty TaskPath -Unique | Where-Object { $_ -like "*-*-*" } | Split-Path -Leaf
|
||||
|
||||
Start-Process -FilePath "C:\Windows\system32\deviceenroller.exe" -Wait -ArgumentList "/o $EnrollmentID /c /b"
|
Reference in New Issue
Block a user