Remote Command Operator not working

Hello Experts,

I am working on accessing details of Active directory member group with the following command - 

dsquery user -name "abc" | dsget user -memberof -expand

here "abc" is the user name in Active directory.

This command is working fine and giving me the values but when run using Remote Command Execution Operation (/Base [1.8.0]/Library/Operations/Operating Systems/Windows/Remote Command Execution) it is failing with the following error. - 

 

{exception=System.Exception: Error occured while executing command. Process Return Code: '-2147016672'. StdErr may have more information.
at dotNETWebActions_RemoteExecution.RemoteExecution.Execute(ActionRequest req, ISession s, IActionRegistry reg);StdErr=dsquery failed:The operation being requested was not performed because the user has not been authenticated.
type dsquery /? for help.;returnCode=1;ProcessReturnCode=-2147016672;returnResult=Error occured while executing command. Process Return Code: '-2147016672'. StdErr may have more information.;StdOut=;ReturnValue=0;ProcessID=5820;sessionId=new session;isSessionOn=False;Result=dsquery failed:The operation being requested was not performed because the user has not been authenticated.
type dsquery /? for help.;}

Any idea how to execute this command and by which operator?

Regards,

MIAJ