My environment is management suit 8.7 sp6, and want to retrieve the members of local admin group. Though VBS and Powershell can do it, but maybe some client run personal firewall,and the wmi or ADSI failed, so I want to use LANDesk to do it, and I think startasuser.exe call a command line is the best method. I write a batch named test.cmd like below:
startasuser.exe net localgroup administrators>c:\%computername%.txt
Then create a task,call the batch file, but the task always failed,it's result is "Incorrect function", the log indicate that "processing of package is complete, result -2147024895 (0x80070001 - code 1)"
why it failed? Is it right fotmat for startasuser.exe?