If you need to send emails from CMD and you don’t have the option to change the client for any reason, one option is to use Email OAuth 2.0 Proxy. It’s a python project, but the author also provides an exe version. Otherwise, you can compile python into an exe yourself. Of course, there’s nothing stopping you from running python as is.
OAuth supports GMAIL and O365 in parallel.
The project is constantly updated, so it can be considered live.