/ImpersonateSystem

Impersonate Windows built-in SYSTEM account

Primary LanguagePowerShellBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

ImpersonateSystem

PowerShell Gallery

Impersonate Windows built-in SYSTEM account.

Description

Impersonate Windows built-in SYSTEM account and execute commands on its behalf by invoking a scriptblock.

Note: Requires to be run as Administrator.

Installation

Install from PowerShell Gallery

Install-Module -Name ImpersonateSystem

or

git clone https://github.com/off-world/ImpersonateSystem

Usage

Import-Module ImpersonateSystem

Invoke-AsSystem { [System.Environment]::UserName }

Examples

Get-Help Invoke-AsSystem -Examples