If your FM Server is setup with defaults, the Server service likely runs under the local system account. When you run the command manually, it will be using the account you are logged in with and since it is successful, that account would seem to have the needed privs.
The one way I know around this is to have the FM server service run under a domain account and ensure that this account has the privs needed to run your various commands. You can set this up in the Windows Services Manager. Locate the FM Server service and in one of the property settings, you can assign the service to run with a specified account. I don't have a Windows server setup in front of me, so I can't say exactly where this setting is.
Thanks a lot for the quick response. Switching the user running FMS to a full admin one and restarting the service did the trick. Should I thought of that myself. Again thanks.