I created a policy which executes the following command
'/Applications/Install macOS Monterey.app/Contents/Resources/startosinstall' --agreetolicense --nointeraction --forcequitapps
via the Files and Processes --> Execute Command field on Macs which are capable of Monterey and do have the installer downloaded.
Although the command is correct AND the Macs did the upgrade the logged result of the command is:
/bin/sh: /Applications/Install macOS Monterey.app/Contents/Resources/startosinstall: No such file or directory
Does anybody have an idea why?
It is misleading that the log shows "No such file or directory" although the command is run properly.
Not sure it helps your case but FYI I ran:
/Applications/Install\ macOS\ Monterey.app/Contents/Resources/startosinstall --agreetolicense --nointeraction --forcequitapps
remotely through ARD and it did work. Of course, the central requirement is that the installer app exist in that location in the first place. Not a direct answer, but maybe a workaround if it helps anyone.
UPDATE (should have tried this first before posting). So I had to make a policy to copy the dmg/app to the correct location anyway since JAMF is much faster than ARD with the file size. I tried making a "step 2" policy rigged to run after the 1st/copy that only did the exact cmd posted above, and success! Automatic updating underway. Is it possible your cmd was just running before your actual copy completed or anything? Anyway, that got things working for me.