2018年5月23日 星期三

PsTools 遠端執行指令

下載及說明網址 https://docs.microsoft.com/en-us/sysinternals/downloads/pstools


例:
psexec -u domain\hammer -p 123456 @skype.txt -d -i -c c:\Skype-8.22.0.2.exe /verysilent


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 into

PowerShell 無法執行腳本

查看目前的執行原則 Get-ExecutionPolicy 預設原則為Restricted,也就是受到限制的意思,所以造成你無法執行Powershell的腳本。 PowerShell 執行原則共有七個: AllSigned: 可執行已簽署的腳本 Bypass: 不會封鎖任何項目,...