VMware Workspace ONE Community
Glorie820
Contributor
Contributor

How to sync using cmd command Windows 10

I would like to know if there is a way to sync MDM policies using cmd command instead of press sync because some time automatic sync fails .

Tags (2)
4 Replies
AaronWhittaker
Enthusiast
Enthusiast

We have asked our VMWare rep multiple times if this is possible, as well as opening a support ticket through to VMWare support and the answer has always been 'No' but if you do find a way we would love to know.

0 Kudos
Pim_van_de_Vis

I'm also not sure if there is an official way to do this.

But you could try what happens when you run AWProcessCommands.exe or any of the other executables located at C:\Program Files (x86)\Airwatch\AgentUI

0 Kudos
JosueNegron
VMware Employee
VMware Employee

This should ONLY be used for testing and troubleshooting purposes. Using this in any type of automation on the device is NOT recommended.

Windows 10 leverages modern management built into the device for real-time communication, thus you should troubleshoot why this communication is not working rather than trying to force syncs on the device. Please refer to Troubleshooting Windows 10 for more details on troubleshooting. There are also improvements to our Intelligent Hub which will start to self heal these types of issues as well.

Back to your question, please refer to this blog on how to force this sync programmatically: https://oofhours.com/2019/09/28/forcing-an-mdm-sync-from-a-windows-10-client/

giladreichv
Contributor
Contributor

The `AWProcessCommands.exe` receives some arguments, so from a powershell script you can technically do:
& "${env:ProgramFiles(x86)}\Airwatch\AgentUI\AWProcessCommands.exe" SyncNow
 
It can also be used for post-enrolling, although the recommended enrolment method is through passing arguments to the MSI:
& "${env:ProgramFiles(x86)}\Airwatch\AgentUI\AWProcessCommands.exe" Enroll `
ENROLL=Y `
SERVER="$aw_team.awmdm.com" `
LGName="$aw_org" `
USERNAME="$aw_user" `
PASSWORD="$aw_enroll_pwd" `
ASSIGNTOLOGGEDINUSER=Y `
DEVICEOWNERSHIPTYPE=CD
 
The rest of AirWatch components using this executable for pretty much doing some of these actions. But yeah, these things aren't documented anywhere, since they're supposed to be hidden from the end-user, so use with cautious.
 
One other way would probably be using AirWatch API, but when I tried it, the API was super unstable and never worked as it should.
0 Kudos