Skip to content
  • 0 Votes
    8 Posts
    1k Views
    P

    @SGaist
    Great idea! I change the code and everything should work. I close the topic and if I encounter any other problems I will create a new one.
    @SGaist , @JoeCFD Thank you for your help!

  • 0 Votes
    11 Posts
    2k Views
    S

    The problem might be that you have two nested calls to PowerShell without exiting them. A quick search shows people reporting the inner PowerShell call (with -Verb runas) keeps the console window open. So, instead of the netsh command you might want to provide a script that has the netsh command and an exit. Or maybe you can concatenate the two directly in the -ArgumentList (I don't have much experience with PowerShell, but in Linux I could separate commands with a semicolon).