Skip to content

Instantly share code, notes, and snippets.

@contactbrenton
Created September 11, 2024 03:57
Show Gist options
  • Save contactbrenton/2c11ce8c7f5cc7feff42f721dc60cc86 to your computer and use it in GitHub Desktop.
Save contactbrenton/2c11ce8c7f5cc7feff42f721dc60cc86 to your computer and use it in GitHub Desktop.
# This script syncs a device with intune using powershell.
# This can be pushed with RMM and avoids the dreaded "remote wipe" and "remote sync" buttons being mixed up.
# Source: https://oofhours.com/2024/03/30/when-does-a-windows-client-sync-with-intune/
[Windows.Management.MdmSessionManager,Windows.Management,ContentType=WindowsRuntime]
$session = [Windows.Management.MdmSessionManager]::TryCreateSession()
$session.StartAsync()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment