Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


GIS Zug
2015-09-16T09:34:50Z
Hi

Powershell is able to execute that string to get a process on a remote server:
get-process "chromedriver" -computername "didbnt12.zg.ch"

Somehow, VisualCron is not able to execute it:

ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShellx86.exe" 20145)->System.Management.Automation.PSArgumentException: Cannot process argument because the value of argument "name" is invalid. Change the value of the "name" argument and run the operation again.
at System.Management.Automation.Runspaces.CommandParameter..ctor(String name, Object value)
at System.Management.Automation.Runspaces.CommandParameterCollection.Add(String name, Object value)
at TaskPowerShell.PowerShellTaskClass.Run(ProcessPowerShellTaskInfoClass ti, StringBuilder& sbResultObject)
Exception in Task: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShellx86.exe" 20145)->System.Management.Automation.PSArgumentException: Cannot process argument because the value of argument "name" is invalid. Change the value of the "name" argument and run the operation again.
at System.Management.Automation.Runspaces.CommandParameter..ctor(String name, Object value)
at System.Management.Automation.Runspaces.CommandParameterCollection.Add(String name, Object value)
at TaskPowerShell.PowerShellTaskClass.Run(ProcessPowerShellTaskInfoClass ti, StringBuilder& sbResultObject)


Is there someone that can help?

Regards Dominic
Sponsor
Forum information
Support
2015-09-16T17:39:02Z
Probably, the computer name is wrong or cannot be resolved. Try first using the local ip. If it a remote process you need to select Credential as well but please use the IP to be sure.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
GIS Zug
2015-09-18T07:30:14Z
Hi

The Skript doesn't even work locally without credentials:
get-process "OracleVssWriterZGGEOPRD" -computername "IP-Adress"

or

get-process "OracleVssWriterZGGEOPRD" -computername "localhost"

or only
get-process "OracleVssWriterZGGEOPRD"


ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShellx86.exe" 20439)->System.Management.Automation.PSArgumentException: Cannot process argument because the value of argument "name" is invalid. Change the value of the "name" argument and run the operation again.
at System.Management.Automation.Runspaces.CommandParameter..ctor(String name, Object value)
at System.Management.Automation.Runspaces.CommandParameterCollection.Add(String name, Object value)
at TaskPowerShell.PowerShellTaskClass.Run(ProcessPowerShellTaskInfoClass ti, StringBuilder& sbResultObject)
Exception in Task: ExecuteProcess("C:\Program Files (x86)\VisualCron\\TaskPowerShellx86.exe" 20439)->System.Management.Automation.PSArgumentException: Cannot process argument because the value of argument "name" is invalid. Change the value of the "name" argument and run the operation again.
at System.Management.Automation.Runspaces.CommandParameter..ctor(String name, Object value)
at System.Management.Automation.Runspaces.CommandParameterCollection.Add(String name, Object value)
at TaskPowerShell.PowerShellTaskClass.Run(ProcessPowerShellTaskInfoClass ti, StringBuilder& sbResultObject)
Support
2015-09-18T20:42:19Z
I got this working with default settings (if you create a new powershell Task without Credentials):

get-process "visualcronservice" -computername "sandbox"

sandbox is my computername.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
GIS Zug
2015-09-25T13:41:00Z
I got it working because I changed the scope from remote to lokal.

Since I'm able now to GET a service, I want to kill it with:

{$process=Get-Process chromedriver -computername "didbnt12.zg.ch"; $process.Kill();}

I'm getting a SUCCESS but the service is still running.
So I guess the killing part doesn't work.
Do I have to write it differently?

The account I'm using is in the group "Adminstrators" on that remote server.

Can you help?
Support
2015-09-25T15:24:36Z
I do not know about Kill() but you can use Stop-Process:

Get-Process program.exe | Stop-Process
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top