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

 

 

 

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

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

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • executorservice线程池建立_线程池 threadlocal

    executorservice线程池建立_线程池 threadlocalExecutorService建立多线程的步骤:1。定义线程类classHandlerimplementsRunnable{}2。建立ExecutorService线程池ExecutorServiceexecutorService=Executors.newCachedThreadPool();或者intc

  • mysql搜索引擎

    mysql搜索引擎mysql搜索引擎

  • linux ettercap,CentOS下安装ettercap

    linux ettercap,CentOS下安装ettercapCentOS下安装ettercapettercap下载地址http://ettercap.sourceforge.net/download.php下载好之后解压出来,进入到解压目录#tarzxvfettercap-NG-0.7.3.tar.gz#cdettercap-NG-0.7.3阅读README#vimREADMEMANDATORY://安装必须依赖的libpcap>=…

  • MATLAB02:结构化编程和函数定义「建议收藏」

    文章目录MATLAB02:结构化编程和函数定义结构化编程流程控制语句和逻辑运算符流程控制语句示例使用循环语句应尽量预先分配内存空间MATLAB02:结构化编程和函数定义结构化编程流程控制语句和逻辑运算符与大多数编程语言相同,MATLAB有以下流程控制语句:流程控制语句作用if,elseif,else若if语句为真,则执行子句switch,case,ot…

  • 使用 BasePage 来解决 GridView 执行 RenderControl 产生的错误

    使用 BasePage 来解决 GridView 执行 RenderControl 产生的错误摘要GridView控件常有需要汇出Excel的需求,一般都是将GridView使用RenderControl来输出其HTML程序代码。本文即在讨论RenderControl所产生的问题及解决方式,不过本文是透过BasePage的方式,让RenderControl的相关处理动作更简化。手动解决RenderControl所产生的问题下面的Contr…

  • Eclipse将Maven项目打成jar包[通俗易懂]

    Eclipse将Maven项目打成jar包[通俗易懂]利用Eclipse将项目打包成jar,放入服务器执行。1:在eclipse中选中项目,右键,RunAs,RunConfigurations,输入package,然后点击run执行。2:在eclipse控制台会显示打jar的日志信息,当看到BUILDSUCCESS,代表打包成功。3:将jar包发布到服务器首先将middleware-0.0.1-SNAPSHOT.jar包上传到服务器任意目录,然后查看改jar包是否正在执行。ps-ef|grepjava#查询java进程如果存在,

发表回复

您的电子邮箱地址不会被公开。

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