Well not quite, but you can probably use pvesh to script something usable. What you'd need to do is use first get the current setting for efidisk0, you can do that via something like qm config <vmid>| grep efidisk0. Then append ms-cert=2023k to the old setting there and update the config like so: pvesh set /nodes/<node>/qemu/107/<vmid> --efidisk0 <new-config>.
So the finally pvesh command will likely look something like this: pvesh set /nodes/pve-1/qemu/110/config --efidisk0 "efitype=4m,file=image-store:vm-107-disk-0,pre-enrolled-keys=1,size=4M,ms-cert=2023k".
Note that you should make sure that no other config changes are made while you do this, or they might get overwritten.
Appreciate the input!
What throws me off, is the "qm enroll-efi-key vmid" seems to do a lot more than just add a tag to the vm config file.
root@frontend-test:~# qm enroll-efi-keys 100
efidisk0: enrolling Microsoft UEFI CA 2023
INFO: reading raw edk2 varstore from /var/run/qemu-server/qsd-vm-100-efi-enroll-efidisk0-enroll.fuse
INFO: var store range: 0x64 -> 0x40000
INFO: add db cert /usr/lib/python3/dist-packages/virt/firmware/certs/MicrosoftCorporationUEFICA2011.pem
INFO: certificate already present, skipping
INFO: add db cert /usr/lib/python3/dist-packages/virt/firmware/certs/MicrosoftUEFICA2023.pem
INFO: add db cert /usr/lib/python3/dist-packages/virt/firmware/certs/MicrosoftWindowsProductionPCA2011.pem
INFO: certificate already present, skipping
INFO: add db cert /usr/lib/python3/dist-packages/virt/firmware/certs/WindowsUEFICA2023.pem
INFO: add KEK cert /usr/lib/python3/dist-packages/virt/firmware/certs/MicrosoftCorporationKEK2KCA2023.pem
INFO: writing raw edk2 varstore to /var/run/qemu-server/qsd-vm-100-efi-enroll-efidisk0-enroll.fuse
successfully updated efidisk