PS_Scripter,
Welcome to the forum. ![]()
- It might be easier to ask same fairly technical questions in your native language. There are some great German forums out there targetting Powershell scripting among other topips … one of them is https://www.mcseboard.de
- It sounds a little bit like an XY Problem. What task are you actually trying to do? What info you want to query about the OS?
- Why not running both scripts with the proper account / elevated in the first place? I’d try to reduce complexity as much as possible.
-
Do you mean it does not stay open or it does not stay visible?
-
Have you tried using the parameter
-Verb RunAsto start the second PowerShell process elevated? -
Why did you categorize your question as “Open Discussions” and not as “PowerShell Help” if you want to get help for your particular issue?
-
When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
Thanks in advance
Guide to Posting Code - Redux <---- Click
![]()
( !! Sometimes the preformatted text button hides behind the settings gear symbol.
)