WeTi
asked on
Using Powershell stop multi services.
Dear expert
I would like to know how I write this command in powershell.
I would stop all Services that have service name: Aptic ifront of servicename, for exemple: the name can be: ApticApp1, ApticApp2, all services that got Aptic stop it. if failed stop return a variable $failstop. Services is not on local computer so a network computername or IP is needed.
How do i do? Thanks.
Regards
I would like to know how I write this command in powershell.
I would stop all Services that have service name: Aptic ifront of servicename, for exemple: the name can be: ApticApp1, ApticApp2, all services that got Aptic stop it. if failed stop return a variable $failstop. Services is not on local computer so a network computername or IP is needed.
How do i do? Thanks.
Regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Just the name, FQDN, or IP address, no backslashes.
ASKER
Great as always, thnx.
ASKER
I tried not working tho... no error too
You need to be more precise than "not working".
ASKER
oh, I checked, well this PS check for service name, not display name, so display name is Aptic something but service name is something else, is there a way to make powershell check display name of services?
It wouldn't be PowerShell if there weren't.
Just replace -Name in the first line with -DisplayName
Just replace -Name in the first line with -DisplayName
ASKER
works well, thanks again!
ASKER
-ComputerName RemoteMachine here if computer in network called: weti, then its -ComputerName weti or -ComputerName \\weti? If i want to use IP instead how to do then?
Thanks