如何关闭/重新启动域中的所有计算机?当我在以管理员身份登录的域控制器上时。
客户端是 Windows 7,服务器是 Windows Server 2008 机器。我试过了
shutdown.exe /i
Run Code Online (Sandbox Code Playgroud)
然后选择计算机,但它只是返回:
PCNAME: The entered computer name is not valid or remote shutdown is not suppor ted on the target computer. Check the name and then try again or contact your system administrator.(53)
Run Code Online (Sandbox Code Playgroud)
psshutdownSysinternals的工具支持计算机名称的通配符。
用法:psshutdown [[\\computer[,computer[,..] | @file [-u 用户 [-p psswd]]] -s|-r|-h|-d|-k|-a|-l|-o [-f] [-c] [-t nn|h :m] [-ns] [-v nn] [-e [u|p]:xx:yy] [-m "消息"]
- 显示支持的选项。
computer 在远程计算机或指定的计算机上执行命令。如果
您省略了命令在本地系统上运行的计算机名称,并且
如果指定通配符 (\\*),则该命令将在所有计算机上运行
当前域。
@file 在指定的文本文件中列出的每台计算机上运行该命令。
...
编辑:正如emgee在评论中所建议的,我添加了有关使用文件列出要关闭的计算机的信息。