Logo Vibhu Bhatnagar — PowerShell & Infrastructure Engineer
  • Home
  • About
  • Skills
  • Experiences
  • More
    Education Projects PowerShell Modules Articles Recent Posts Accomplishments
  • Posts
  • Notes
  • Hire Me
  • GitHub
  • Dark Theme
    Light Theme Dark Theme System Theme
Logo Inverted Logo
  • Tags
  • Active Directory
  • AI
  • AI Tools
  • Automation
  • Azure AD
  • Design Systems
  • Developer Tools
  • GPO
  • Intune
  • MCP
  • Module
  • MSP
  • PowerShell
  • Printers
  • RDP
  • Registry
  • Remote Management
  • RMM
  • Sysadmin
  • SYSTEM
  • Windows
  • Windows Administration
  • WinRM
Hero Image
Running PowerShell as the Logged-On User from SYSTEM Context

If you have ever deployed a PowerShell script through Intune, a RMM agent, or Task Scheduler running as SYSTEM, you have hit this wall at least once: the script works perfectly when you run it interactively, but returns nothing — or the wrong thing — when deployed at scale. The reason is almost always the same. The script is collecting user-specific data. And SYSTEM is not the user. The Problem: SYSTEM and the User Are Not the Same Session When Intune or your RMM agent executes a PowerShell script, it runs in the SYSTEM context. SYSTEM is a highly privileged account, but it is completely isolated from the interactive user session happening on the same machine at the same time.

  • PowerShell
  • Intune
  • RMM
  • GPO
  • SYSTEM
  • Module
  • Sysadmin
  • Windows
Thursday, April 23, 2026 | 6 minutes Read
Navigation
  • About
  • Skills
  • Experiences
  • Education
  • Projects
  • PowerShell Modules
  • Articles
  • Recent Posts
  • Accomplishments
  • GitHub
Contact me:
  • vibhu@pwsh.in
  • Vibhu2
  • Vibhu Bhatnagar
  • +91 8979989222

Liability Notice: The views and opinions expressed on this blog are my own and do not represent those of my employer. All content is provided for informational purposes only.


Toha Theme Logo Toha
© 2026 Vibhu Bhatnagar. All rights reserved.
Powered by Hugo Logo