Invoke-AsCurrentUser_WithArgs
1.0.0
Execute PowerShell scriptblocks in the context of the currently logged-in user from a SYSTEM context. Ideal for Intune deployments, SCCM task sequences, and scheduled tasks.
Minimum PowerShell version
5.1
Installation Options
Owners
Copyright
(c) 2025. All rights reserved.
Package Details
Author(s)
- Harze2k
Tags
RunAsUser Intune SCCM SYSTEM UserContext Deployment Windows
Functions
Invoke-AsCurrentUser_WithArgs Serialize-Object Deserialize-Object Get-RunAsUserCSharpSource
PSEditions
Dependencies
This module has no dependencies.
Release Notes
## Version 1.0.0
- Initial release
- Execute scriptblocks as currently logged-in user
- Pass arguments/variables to scriptblocks
- Capture transcript and execution results
- Support for PowerShell 5.1 and 7+
- Configurable timeout handling
- Optional stream capture (stdout/stderr)
FileList
- Invoke-AsCurrentUser_WithArgs.nuspec
- Invoke-AsCurrentUser_WithArgs.psd1
- Invoke-AsCurrentUser_WithArgs.psm1
- LICENSE
- README.md
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 1.0.0 (current version) | 496 | 12/1/2025 |