Windows Command line, upload then share?

Hopefully I am not too far of on category here.

Is it possible using the command line in windows to add a file, and thn share and retrieve the URL for the share?

I don’t know if there is a command line client for webdav on windows, there is probably a third-party webdav client which can be controlled on the command line. There is also a python library to create shares: