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


相关推荐

  • win10系统显示打印机未连接到服务器,解决win10提示“Windows无法连接到打印机”的方法…

    win10系统显示打印机未连接到服务器,解决win10提示“Windows无法连接到打印机”的方法…打印机是我们办公室中必备的设备,如今各种打印方式也是层出不穷。最近有用户在使用win10系统进行打印的时候遇到了这样的提示信息:“windows无法连接到打印机”。在更详细的信息提示界面中已经告诉我们是由于本地打印店额后台服务程序没有启用导致的,少数用户在将电脑重新启动之后解决了这个问题,不过大多数的朋友还是得通过手动重启服务才能开始打印。如何才能手动设置这个服务呢,让小编来给大家演示一下吧!方…

    2022年6月11日
    59
  • RenderControl获取控件输出的HTML

    RenderControl获取控件输出的HTML之前写过一篇文章,通过实现ICallbackEventHandler接口,实现其两个方法。RaiseCallbackEvent实现回调处理,GetCallbackResult实现将处理产生的结果输出到客户端。为了实现页面不刷新,我们在GetCallbackResult方法中可以将前台的控件html通过RenderControl方法获取,并Return到客户端…

    2022年7月20日
    12
  • vuecli安装_离线安装vuecli

    vuecli安装_离线安装vuecli前言vue-cli是和vue进行深度组合的工具,可以快速帮我们创建vue项目,并且把一些脚手架相关的代码给我们创建好。真正使用vue开发项目,都是用vue-cli来创建项目的。vue-cli介绍

    2022年7月29日
    9
  • freebsd分片重组算法_mongodb分片算法

    freebsd分片重组算法_mongodb分片算法Q:你们redis怎么做的分布式A:我们公司redis用的murmurHash做的分片;Q:讲讲murmurHash的原理呗A:额……这块没有深入了解过(真TM掉分)哈希算法简单来说就是将一个元素映射成另一个元素,可以简单分类两类,加密哈希,如MD5,SHA256等,非加密哈希,如MurMurHash,CRC32,DJB等。这里说说Jedis中的Shard是如何使用一致性hash的首先是hash函数,在Jedis中有两种Hash算法可供选择,分别是MurMurHash和MD5.按照.

    2022年10月9日
    0
  • ora-01007变量不在选择列表中_oracle存储过程变量赋值

    ora-01007变量不在选择列表中_oracle存储过程变量赋值使用oracle数据库过程中,偶尔遇到ORA-01008:并非所有变量都已绑定这个错误,此时应该查检sql中是否有以下情况:1、varsql=string.Format(“select*fromstudenttwheret.name=‘{0}‘andt.address=‘{1}‘”,name);此时编译不会报错,当执行sql时就会报“ORA-01008:并非所有…

    2022年9月7日
    0
  • 代理IP池(sqlmap外部代理ip池)

    这些公共代理是完全免费提供的,不需要任何授权。免费代理通常是开放的、流行的公共代理。与私人代理不同,公共代理不需要注册或密码。事实上,它们是负责安装在计算机上的代理服务器并且不关心更改默认设置的系统管理员的错误或疏忽。因此,服务器通过特殊的扫描仪快速定位到网络中,成为渴望匿名的公众的财产。这些信息足以安全地浏览全球网络,而无需显示您的真实IP地址。这些代理有很大的优势:他们有一个简单的设置-这些代理不需要授权并且设置简单他们是免费的!没有流量限制或使用目的但是,除了所有这些优点之外,这

    2022年4月14日
    206

发表回复

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

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