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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 人工智能 猴子摘香蕉问题[通俗易懂]

    人工智能 猴子摘香蕉问题[通俗易懂]人工智能猴子摘香蕉问题1.定义描述环境状态的谓词。AT(x,w):x在w处,个体域:x{monkey},w{a,b,c,box};HOLD(x,t):x手中拿着t,个体域:t{box,banana};EMPTY(x):x手中是空的;ON(t,y):t在y处,个体域:y{b,c};BOX(u):u是箱子,个体域:u{box};BANANA(v):v是香蕉,个体域:v{banana};2.初始状态AT(monkey,a):猴子在a处EMPTY(monkey):猴子手中是空的O

    2022年9月25日
    4
  • C/C++常见面试知识点总结附面试真题—-20220326更新

    C/C++常见面试知识点总结附面试真题—-20220326更新以下内容部分整理自网络,部分为自己面试的真题。第一部分:计算机基础1.C/C++内存有哪几种类型?C中,内存分为5个区:堆(malloc)、栈(如局部变量、函数参数)、程序代码区(存放二进制代码)、全局/静态存储区(全局变量、static变量)和常量存储区(常量)。此外,C++中有自由存储区(new)一说。2.堆和栈的区别?1).堆存放动态分配的对象——即那些在程序运行时分配的对象…

    2022年7月15日
    20
  • lnk2019无法解析的外部符号_declspec_error lnk1120无法解析的外部命令

    lnk2019无法解析的外部符号_declspec_error lnk1120无法解析的外部命令1.前言errorLNK2019:无法解析的外部符号这个错之前见过很多次,能知道最根本的原因在于链接过程中没有搜索到程序用到的库文件,即*.lib。笔记本重装了系统,有32Bit升到64Bit,运行VTK程序时,始终报错如下:1>  正在创建库E:\Driverprogram\imgport\Debug\imgport.lib和对象E:\Driverprog

    2022年10月6日
    1
  • python保存两位小数的几种方法,python2保留小数

    python保存两位小数的几种方法,python2保留小数python保存两位小数的几种方法文章目录:一、保留两位小数且做四舍五入处理1、使用字符串格式化2、使用python内置的round()函数3、使用python内置的decimal模块二、保留两位小数且不做四舍五入处理1、使用序列中的切片2、使用re正则匹配模块一、保留两位小数且做四舍五入处理1、使用字符串格式化>>>x=3.1415926>&…

    2022年8月11日
    11
  • 2020//7/6学习记录

    2020//7/6学习记录1.微信小程序圆角样式border-radius:20rpx;2.微信小程序横向布局display: flex;/*row 横向 column 列表 */flex-direction: row;/* 左右居中 */justify-content: center;/* 上下居中 */align-items: center;3.文字左右布局父元素用到:justify-content:space-between;子元素:<viewstyle…

    2022年8月18日
    9
  • Javascript之其实我觉得原型链没有难的那么夸张!

    原型链、闭包、事件循环等,可以说是js中比较复杂的知识了,复杂的不是因为它的概念,而是因为它们本身都涉及到很多的知识体系。所以很难串联起来,有一个完整的思路、脉络。我最近想把js中有意思的知识点都总结

    2022年3月25日
    43

发表回复

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

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