I think you are a little bit confused, that post explains how to run commands in R, not in RStudio, they are closely related but not the same, R is the programming language and RStudio is an IDE (Integrated Development Environment) for the R language.
And, if I understand you correctly, you want to execute commands on an R session in your server from a cmd terminal in your Windows machine, for that you need to make an ssh connection to the server and open an R session, since Windows now have a native ssh client, it is possible to do it from a cmd terminal.
But if you already have RStudio server installed in your server it would be much easier to just open a session in your Windows machine and simply execute your script.