Elevated User to run functions

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 1 year and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
justo_sanabria
Posts: 1
Last visit: Mon May 02, 2022 3:54 pm

Elevated User to run functions

Post by justo_sanabria »

I have created a simple form to list some information from active directory based upon entering a user ID. I want to run with an administrator account using run-as different user but it doesn't perform any of the functions. If I login as an administrator it works. What is needed to make it accept the run as different user credentials?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Elevated User to run functions

Post by jvierra »

You cannot elevate the current process. You can only elevate a new process.
This topic is 1 year and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked