Windows Powershell ISE (As Administrator with two ps1-files) Share on Facebook Post on reddit Tweet on Twitter Share on LinkedIn Home › Forums › Scripting › PowerShell › Windows Powershell ISE (As Administrator with two ps1-files) Tagged: Powershell This topic contains 5 replies, has 3 voices, and was last updated by JeremyW 8 months, 3 weeks ago. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts dreivilo47Participant February 11, 2019 at 6:49 am #614153 I use the following code to open two files in Powershell ISE: powershell_ise.exe -File “C:\test\test1.ps1,C:\test\test2.ps1” -NoProfile But… how can I open the Powershell ISE as Administrator and then open the two files? wullieb1Moderator February 11, 2019 at 8:31 pm #614212 Start-Process -FilePath powershell_ISE.exe “C:\Test\Test1.ps1,C:\Test\Test2.ps1” The NoProfile option doesn’t work. dreivilo47Participant February 12, 2019 at 7:23 am #614221 Thank you for your answer/solution wullieb1. You have forgotten “-Verb RunAs” to run it as administrator. So, the full line is: Start-Process -FilePath powershell_ise.exe -ArgumentList “C:\test\test1.ps1,C:\test\test2.ps1” -Verb RunAs Thank you very much for your support wullieb1, my problem is solved! wullieb1Moderator February 12, 2019 at 7:36 pm #614242 Yep sorry i thought i had copied it verbose after testing it would definitely work but i obviously missed it. Glad it resolved your issue. dreivilo47Participant February 15, 2019 at 6:34 am #614301 No problem wullieb1, this happens sometimes. Thank you again. Have a nice day and weekend! JeremyWModerator February 21, 2019 at 11:54 am #614421 There’s several ways to accomplish this with the noprofile option. From powershell: Start-Process -FilePath powershell_ise.exe -ArgumentList “-File”,”C:\test\test1.ps1,C:\test\test2.ps1″,”-NoProfile” -Verb RunAs From command prompt: RunAs /User:domain\username “powershell_ise.exe \”C:\test\test1.ps1,C:\test\test2.ps1\” -NoProfile” Note the backslash to escape the double quotes used in the arguments. Of course there’s more ways to do it too. :) Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic.