I am executing below command through autosys(scheduling tool) to stop a service but it is failing with below error. The command works fine when i run the command on RUN(WIN+R) or cmd after RDPing into the server. Can anyone help me here with a right command?
Command: C:\windows\System32...powershell Start-Process powershell -Verb runAs E:\ABC\stop_service.ps1
Content of stop_service.ps1 = stop-service -name 'service-abc'
Error: Start-Process : This command cannot be run due to the error: This operation requires an interactive window station.
At line:1 char:1 + Start-Process powershell -Verb runAs E:\ABC\stop_service.ps ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOp erationException + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand