none
Run get-process -IncludeUserName command with simple user RRS feed

  • Question

  • Hello Scripting Guys!

    I wrote a dummy Task manager GUI for simple users via PowerShell. It works fine when I run with administrator privilege but it doesn't work with non administrator user.

    The problematic command is:

    Get-Process -IncludeUserName  | Where-Object {$_.username -like $user} | select processname

    Error massage:

    Powershell.exe : The 'IncludeUserName' parameter requires elevated user rights. Try running the command again in a session that has been opened with elevated user rights (that is, Run as Administrator).
    At C:\install\TaskManager.ps1:32 char:1
    + Powershell.exe -windowstyle hidden { #PowerShell ablak ne fusson a program mögöt ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [Get-Process], InvalidOperationException
        + FullyQualifiedErrorId : IncludeUserNameRequiresElevation,Microsoft.PowerShell.Commands.GetProcessCommand

    I would like to find a bypass solution, can anyone help?

    Thanks is advance,

    Zsolt


    • Moved by Bill_Stewart Friday, March 15, 2019 8:06 PM No, you cannot bypass UAC
    Thursday, February 14, 2019 2:06 PM

All replies

  • I would like to find a bypass solution, can anyone help?
    You cannot bypass UAC. That's a built in security feature.

    Live long and prosper!

    (79,108,97,102|%{[char]$_})-join''

    Thursday, February 14, 2019 4:03 PM
  • I meant how can I run with simple user. :)

    I think need to be a solution.

    Friday, February 15, 2019 8:32 AM