windows 使用 cmd 通过 WiFi 远程关闭计算机

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21647488/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 11:21:51  来源:igfitidea点击:

Remote shutting down computer over WiFi with cmd

windowscmdwifiremote-accessshutdown

提问by Recon

Remote shutting down Windows computer with cmd. Possible?

使用 cmd 远程关闭 Windows 计算机。可能的?







I have searched over the internet我在互联网上搜索过,我找到了很多解决这个问题的方法,


BUT

No one has worked.I don't have got the password for the other computer, or permission to shutdown it, I get everytime: Access denied. (5)So my quetions are:

没有人工作过。我没有另一台计算机的密码,也没有关闭它的权限,我每次都得到:拒绝访问。(5)所以我的问题是:

  • Is there any software tool to do that?
  • Is it possible at all?
  • Can I make it in Windows on both computers?
  • 有没有什么软件工具可以做到这一点?
  • 有可能吗?
  • 我可以在两台计算机上的 Windows 中创建它吗?

Not exactly needed cmd, but must be shutted down by remotely, without installing any software on the second computer.

不是完全需要的cmd,但必须通过远程关闭,而无需在第二台计算机上安装任何软件。

Many thanks for help

非常感谢您的帮助

回答by MiKE

I found the solution for you.

我为您找到了解决方案。

RUN secpol.msc in CMD (on the computer u want to enable the remote shutdown)

Go to Local Policies -> User Rights Assignment and search for "Force shutdown from a remote system"

转到本地策略 -> 用户权限分配并搜索“从远程系统强制关闭

Double click it and then "Add User or Group..." and type "Everyone" and then add it.

双击它,然后“添加用户或组...”并键入“ Everyone”,然后添加它。

This SHOULD work! I've set this configuration on my computer and then executed this command on my brother's PC while we are on the same LAN network and i've got the shutdown message AND the computer did restart.

这应该有效!我已经在我的计算机上设置了这个配置,然后在我兄弟的 PC 上执行了这个命令,而我们在同一个 LAN 网络上,我收到了关机消息并且计算机确实重新启动了。

shutdown -m \\mypcname -r -c "this pc will shutdown in 60 secs" -t 60

shutdown -m \\mypcname -r -c "这台电脑将在 60 秒后关闭" -t 60

Be sure that u can see the computer u want to shutdown trought net view. But u already see it, because u are getting the Access denied. (5).

确保您可以看到您要关闭的计算机 trought net view。但是你已经看到了,因为你的访问被拒绝了。(5).

Report back to the question if it works!

如果它有效,请报告问题!

Kind Regards

亲切的问候

回答by user2757572

Look at: http://www.wikihow.com/Do-a-Remote-Shutdown-for-a-PC-on-a-LANquote: "At your local command prompt type in shutdown -m \computername, replacing "computername" with the name of the computer you wish to shutdown or the computer's IP address."

查看:http: //www.wikihow.com/Do-a-Remote-Shutdown-for-a-PC-on-a-LAN引用:“在您本地的命令提示符下输入 shutdown -m \computername,替换”计算机名”包含您要关闭的计算机的名称或计算机的 IP 地址。”

Or from within a remote session: shutdown /s /t 0

或者在远程会话中:shutdown /s /t 0

(meaning: shut down in 0 seconds)

(意思是:0秒后关闭)

回答by Herman H.

  • Open cmd
  • Write net view
  • Find the computer you want to kick form your wifi or turn off
  • Write ping ex: USER
  • Find ip address
  • Write shutdown -I
  • 打开cmd
  • net view
  • 找到您要从 wifi 中踢出的计算机或关闭
  • ping ex: USER
  • 查找IP地址
  • shutdown -I