Using the /cert and /regcode arguments to dopus.exe fails (since 2022)

That's quite unusual! Or did you mean PowerShell?

We don't have any similar reports. Did anything change in your script?

Is the script running elevated or normally? It may need to be elevated.

Is the command being run when Opus is already running? It won't work if it is. ( HOW TO: Perform silent (un)install of Directory Opus )