Posted on 02-03-2023 11:37 AM
Hello Everyone,
I am having an issue with one of our technicians leaving Remote Desktop enabled. I thought that Jamf Pro would log the username of the Jamf user who enables it but the field is blank under management history. See attached picture.
Is there a way through a smart group/script after so much time has elapsed that it would auto disable remote desktop?
Thank you!
02-03-2023 01:43 PM - edited 02-03-2023 01:45 PM
Change Management logs these actions, and you can output to a syslog server of your choice?
Take a look under System > Change Management inside Jamf Pro. Your search criteria would be "EnableRemoteDesktop" and "DisableRemoteDesktop".
There is no option to automatically disable Remote Desktop via MDM, but you could potentially create an EA to capture the status and a script to disable. If I remember correctly though, Apple have deprecated some of those Terminal commands in favor of MDM.
Posted on 02-06-2023 05:50 AM
Remote desktop can be disabled with CLI. For JAMF to be able to turn Remote Desktop off after a period of time, JAMF would need to know time has passed since it was abled. I am not aware of a way to see when Remote Desktop was enabled, but that does not mean you could not create a way.
Note, a flag file is just a text document you are placing on a device for JAMF to look for. Its like the device raising a flag.To make life easier do not reuse flag files for multiple purposes.
The work flow.
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate
You could also do this with JAMF API, but its probably best not to.