Skip to content

Instantly share code, notes, and snippets.

@ices-dev
Last active March 15, 2020 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ices-dev/4ba4ee3f8308abcccbd6d283071587e9 to your computer and use it in GitHub Desktop.
Save ices-dev/4ba4ee3f8308abcccbd6d283071587e9 to your computer and use it in GitHub Desktop.
<#
***********************************************************************************************
* This script allows to enter locked sessions of other users without knowing their passwords. *
* *
* Autor: mail@ices.cloud *
* Date: 15-03-2020 *
* *
* Installation: *
* PsExec is required: https://docs.microsoft.com/en-us/sysinternals/downloads/psexec *
* Unpack the folder "PSTools" next to this script. *
* *
* Usage: *
* Execute the script, it will ask for the admin password and open the Taskmanager. *
* Just right click the User in Taskmanager an connect! ;) *
***********************************************************************************************
#>
# Kill the Taskmanager if it already running
if (Get-Process -Name "taskmgr" -ErrorAction SilentlyContinue) {
Stop-Process -Name "taskmgr" -Force
}
# Start a new Taskmanager with PsExec in elevated mode
Start-Process -FilePath "$PSScriptRoot\PSTools\PsExec.exe" -ArgumentList "-accepteula -SID taskmgr" -Verb runAs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment