Você pode usar o script Invoke-TokenManipulation.ps1 :
This script requires Administrator privileges. It can enumerate the Logon Tokens available and use them to create new processes. This allows you to use anothers users credentials over the network by creating a process with their logon token. This will work even with Windows 8.1 LSASS protections.
Copie e cole-o ou salve junto com o script como Invoke-TokenManipulation.ps1
e use o recurso de ponto para carregar:
$ScriptDir = Split-Path $script:MyInvocation.MyCommand.Path
. (Join-Path -Path $ScriptDir -ChildPath 'Invoke-TokenManipulation.ps1')
E então você pode usar a função Invoke-TokenManipulation
.
Exemplo:
# This command fails on my machine, even with admin rights
Get-ChildItem C:\Windows\CSC
# Makes the current PowerShell thread impersonate SYSTEM.
Invoke-TokenManipulation -ImpersonateUser -Username "nt authority\system"
# Now we can get contents of this folder
Get-ChildItem C:\Windows\CSC
# Stop impersonating an alternate users Token
Invoke-TokenManipulation -RevToSelf
# Check again
Get-ChildItem C:\Windows\CSC