i am trying to figure out a way to add a right-click option to restart the "besclient" service.
problem 1: you can only enter one line under "ShellCommandRelevance", this rules out the use of "sc" and "net" commands - i need "restart", these only offer "stop" and "start".
solution 1: i am only running this against Windows 7, so i can use Powershell, using this command:
powershell restart-service -inputobject $(get-service -computername pc1234 -name besclient) -verbose
this is working great from CMD, but this brings me to:
problem 2: i need to substitute "pc1234" with "( values of property results whose (name of property of it = "IP Address" ) of current computer) ".
i tried several combinations, none of these worked.
anyone have an idea to either fix this substitution problem, or restart the besclient using right-click in another method?
This topic has been locked.
Pinned topic Right-Click to restart Bigfix client service
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
cwmenard 270005CGYW1 Post
Re: Right-Click to restart Bigfix client service2013-02-04T17:05:08ZThis is the accepted answer. This is the accepted answer.You'll probably need to just create a .ps1 and call it from the registry.
then you could use variables such as:
$computername = $($args)
restart-service -inputobject $(get-service -computername $computername -name besclient) -verbose
In the registry you might use something like:
"Powershell -file \\path\to\my\.ps1 " & name of current computer
SystemAdmin 110000D4XK104 Posts
Re: Right-Click to restart Bigfix client service2013-03-20T14:12:48ZThis is the accepted answer. This is the accepted answer.
- cwmenard 270005CGYW