PSTools[通俗易懂]

PSTools[通俗易懂]howtogetthePSTools?fromhere:http://technet.microsoft.com/en-us/sysinternals/bb897553.aspxAfterdownloadthePSToos,youcanextratehPSToos,thenkyouwillgetasetofPCtools.thatcotain

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全家桶1年46,售后保障稳定

how to get the PSTools?

from here:http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

After download the PSToos, you can extra teh PSToos, thenk you will get a set of PC tools. that cotains PSshutdow,PSExec etc.

 

http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx

Introduction

The Windows NT and Windows 2000 Resource Kits come with a number of command-line tools that help you administer your Windows NT/2K systems. Over time, I’ve grown a collection of similar tools, including some not included in the Resource Kits. What sets these tools apart is that they all allow you to manage remote systems as well as the local one. The first tool in the suite was PsList, a tool that lets you view detailed information about processes, and the suite is continually growing. The “Ps” prefix in PsList relates to the fact that the standard UNIX process listing command-line tool is named “ps”, so I’ve adopted this prefix for all the tools in order to tie them together into a suite of tools namedPsTools.

Note: some anti-virus scanners report that one or more of the tools are infected with a “remote admin” virus. None of the PsTools contain viruses, but they have been used by viruses, which is why they trigger virus notifications.

The tools included in the PsTools suite, which are downloadable as a package, are:

  • PsExec – execute processes remotely
  • PsFile – shows files opened remotely
  • PsGetSid – display the SID of a computer or a user
  • PsInfo – list information about a system
  • PsPing – measure network performance
  • PsKill – kill processes by name or process ID
  • PsList – list detailed information about processes
  • PsLoggedOn – see who’s logged on locally and via resource sharing (full source is included)
  • PsLogList – dump event log records
  • PsPasswd – changes account passwords
  • PsService – view and control services
  • PsShutdown – shuts down and optionally reboots a computer
  • PsSuspend – suspends processes
  • PsUptime – shows you how long a system has been running since its last reboot (PsUptime’s functionality has been incorporated intoPsInfo)

The PsTools download package includes an HTML help file with complete usage information for all the tools.

 

========================================

The folloiwng content is about how to use PSShutdow of PSTools to reboot a PC(local or remote which you have full amdin)

PsShutdown (PsTools)

Initiate a shutdown/reboot of a local or remote computer, logoff a user, lock a system.

Syntax
      psshutdown [[\\computer[,computer[,..] | @file [-u user [-p passwd]]]
         -s|-r|-h|-d|-k|-a|-l|-o 
            [-f] [-c] [-t nn|h:m] [-n s] [-v nn]
               [-e [u|p]:xx:yy] [-m "message"]
Options:

   computer   The computer on which the user account resides. Default=local system 
              a wildcard (\\*), will affect all computers in the current domain.

   -p passwd  Specify a password for user (optional). Passed as clear text.
              If omitted, you will be prompted to enter a hidden password.

   -u user    Specify a user name for login to remote computer(optional).

   @file      Execute the command on each of the computers listed in the file.

   -a         Abort a shutdown (only possible while a countdown is in progress)

   -c         Allow the shutdown to be aborted by the interactive user

   -d         Suspend the computer

  -e [u|p]:xx:yy 
              Shutdown reason code, 'u' = user, 'p'= planned shutdown.
              xx is the major reason code (must be less than 256)
              yy is the minor reason code (must be less than 65536)

   -f         Force all running applications to exit during the shutdown
              instead of giving them a chance to gracefully save their data.

   -h         Hibernate the computer

   -k         Poweroff the computer (reboot if poweroff is not supported)

   -l         Lock the computer

  -m "message" Specify a message to logged-on users when a shutdown countdown commences

   -n         Timeout in seconds connecting to remote computers

   -o         Logoff the console user

   -r         Reboot after shutdown

   -s         Shutdown without poweroff

   -t         Countdown in seconds until the shutdown (default: 20 seconds)
              or the time of shutdown (in 24 hour notation)

   -v         Display message for the specified number of seconds before the shutdown. 
              default= display a shutdown notification dialog,
              specifying a value of 0 results in no dialog.

   -          Help, display the supported options.

Jetbrains全家桶1年46,售后保障稳定

This tool allows administrators to create a batch file that will run against multiple computers to perform a mass change of the administrator password.

Examples:

Reboot \\workstation64 as part of an OS upgrade

psshutdown \\workstation64 -r -e p:2:3

“I shall go the way of the open sea, To the lands I knew before you came,
And the cool ocean breezes shall blow from me, The memory of your name” ~ Laurence Hope

Related:

SHUTDOWN – With full list of reason codes
TSSHUTDN – Remotely shut down or reboot a terminal server
Powershell:
$os = (Get-WmiObject Win32_OperatingSystem -ComputerName MyServer64)
$os.psbase.Scope.Options.EnablePrivileges = $true
$os.reboot()

Equivalent bash command (Linux): shutdown – Shutdown or restart linux

 

 

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/200791.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • C++并发实战19:lock free编程

    C++并发实战19:lock free编程涉及到并行/并发计算时,通常都会想到加锁,加锁可以保护共享的数据,不过也会存在一些问题:1.由于临界区无法并发运行,进入临界区就需要等待,加锁使得效率的降低。多核CPU也不能发挥全部马力2.在复杂的情况下,很容易造成死锁,并发进程、线程之间无止境的互相等待。3.在中断/信号处理函数中不能加锁,给并发处理带来困难。4.加锁影响实时性,等待时间不确定5.优先级反转,优先级

    2022年7月19日
    21
  • 前端代码自动生成器「建议收藏」

    前端代码自动生成器「建议收藏」场景1.CodeFun是什么CodeFun是一款UI设计稿智能生成源代码的工具,支持微信小程序端、移动端H5和混合APP,上传Sketch、PSD等形式的设计稿,通过智能化技术一键生成可维护的前端代码.2.学习成本高吗?对于前端工程师来说,几乎没有学习成本。对于用惯了蓝湖/摹客的前端工程师来说,CodeFun使用流程与前者几乎一致:设计师上传完稿件后,工程师打开界面,选择任意需要的UI区域拷贝走想要的代码即可,只是从原来看标注变成了直接拷贝代码。对于设计师来说,完全不需要遵循某些设计规范

    2022年6月29日
    117
  • idea2021.10.3激活码【2021免费激活】

    (idea2021.10.3激活码)好多小伙伴总是说激活码老是失效,太麻烦,关注/收藏全栈君太难教程,2021永久激活的方法等着你。IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.net/100143.html0YQJ1128OW-eyJsaWNlbnNlSW…

    2022年3月28日
    48
  • Python代码实现Excel转JSON

    Python代码实现Excel转JSON题记项目需求需要用到Excel转JSON,第一时间想到的就是尘封了将近一年的python,一直在JavaJava,python早忘光了,想立刻开始动手却又不敢,最后确认,用python来完成操作Excel有得天独厚的优势,只能硬着头皮上了。短短的代码,做了将近四个小时,中间复习了一下字典和列表,同时也因为其中遇到了一些奇奇怪怪的问题,凌晨一点多躺下,一身轻松。主要技术python3.8.6+字典/列表的运用+对Excel操作的库pandas其中python对Excel操作的库其实有很多,像我

    2022年6月1日
    42
  • 移掉 K 位数字

    移掉 K 位数字

    2020年11月19日
    209
  • Hadoop生态系统组件最全介绍

    Hadoop生态系统组件最全介绍开源改变世界,拥抱开源,拥抱未来Hadoop生态系统组件介绍,掌握吹x大法,走到哪里都不怕图片来自bing,跟视觉中国没关系,嗯,很严肃的声明 功能模块 产品名称 产品简述 关键技术 HDFS 分布式文件系统 MapReduce 数据处理编程:map(数据拆分),shuffle(数据排序分发),reduce(数据合并) YAR…

    2022年5月12日
    43

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号