The script I run to enable Remote Login and Remote Management has been the following:
#!/bin/sh
# enable remote management for ardadmin
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -targetdisk / -activate -configure -clientopts -setmenuextra -menuextra no
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -targetdisk / -configure -users adminuser -access -on -privs -all
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -targetdisk / -configure -allowAccessFor -specifiedUsers -privs -all
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -targetdisk / -restart -agent -menu
#enable remote login for ardadmin
sudo /usr/sbin/systemsetup -setremotelogin on
sudo dseditgroup -o edit -a adminuser -t user com.apple.access_ssh
exit 0
We just upgraded many of our computers to macOS Ventura. I've noticed with macOS Ventura that when trying to Control or Observe with Apple Remote Desktop newly provisioned macOS Ventura machines that it says to turn off and back on Remote Management. I have tested turning it off via terminal command and back on but sometimes I get the following error:
Screen recording might be disabled. Screen Sharing or Remote Management must be enabled from System Settings or via MDM.
Screen control might be disabled. Screen Sharing or Remote Management must be enabled from System Settings or via MDM.
If I do it manually it works every time, but I need to do this remotely in most cases.
I was reading and found on Apple's website this article: https://support.apple.com/en-ca/HT209161.
In Jamf Pro I don't see anywhere that I can do this. I can see in the computer record in the Management Tab a selection for Disable Remote Desktop but if I successfully do this it does not turn to Enable Remote Desktop.
Am I missing something? Is there a sure fire solution here?