如何在Windows中的远程计算机上重新启动服务? [英] How do I restart a service on a remote machine in windows?

查看:83
本文介绍了如何在Windows中的远程计算机上重新启动服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我托管了一个页面,并使用json通过Mobile App从客户端接收数据。并且各个客户的数据将转发给相应的客户。

客户端有公共IP地址,我已经在客户端安装了服务,状态是手动的。



所以当在线网站获得请求时,我需要使用公共IP地址和用户名和密码启动相应客户端的服务。



所以如何在具有公共IP地址的远程客户端计算机上启动该服务。



我尝试过:



净使用\\computername密码/用户:用户名



查询服务是否正在运行或停止:

SC \\computername查询服务名称



查询服务启动类型,路径,显示名称,依赖等:

SC \\computername QC服务名称



启动或停止服务:

SC \\computername开始|停止服务名称



更改服务启动类型:

SC \\computername配置服务名称启动=自动|需求|已禁用





我使用过这些命令。



登录有效,但其他命令无法正常工作,而且消息来自拒绝访问。

Hi,
I have hosted a page and that receives the data from clients through Mobile App using json. And the data of respective client will be forwarded to respective clients.
The Clients have public IP address and i have installed the service on client and status is manually.

so when the online Site gets the request and i need to start the service of respective client with public ip address and username and password.

So how could i start the service on remote client computer having Public IP address.

What I have tried:

Net Use \\computername password /User:username

Query whether the service is running or stopped:
SC \\computername Query servicename

Query the service startup type, path, display name, dependicies etc:
SC \\computername QC servicename

Start or stop a service:
SC \\computername Start|Stop servicename

Change the service startup type:
SC \\computername Config servicename start= Auto|Demand|Disabled


I have used these commands.

The Login works but other commands doesnot works and message came as access denied.

推荐答案

好吧,显然它是一个身份验证问题......我会尝试使用 PsService [ ^ ]因为这至少可以让您指定您正在控制的目标计算机上的用户名和密码
well, obviously its an authentication issue ... I would try using PsService[^] because that at least allows you to specify a username and password on the target machine you're controlling


这篇关于如何在Windows中的远程计算机上重新启动服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆