Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open Powershell Console Window from Powershell

I am writing a script to use multiple plink (PuTTY) sessions as a Windows version of clusterssh. I am stuck however because I want to open multiple Powershell windows from powershell. When I type the command for powershell, it opens a new session. This is similar to typing bash in bash. I want multiple physical windows opening.

I tried -windowstyle as well as the other args to no avail. I was wondering if there is a way you know of. I really appreciate your help. I looked and didn't find anything already here. Thanks for your time.

like image 433
msmith81886 Avatar asked Mar 27 '13 19:03

msmith81886


People also ask

How do I open PowerShell console as administrator?

Use the Run Application You can open Windows PowerShell with administrator privileges from Run. First, press Windows+R to open Run, and then type “powershell” in the text box. Next, press Ctrl+Shift+Enter. Windows PowerShell will open in admin mode.

How do I Run a PowerShell script from the console?

Running a script with PowerShell To open the PowerShell console, click on the Start button (or search button), type powershell, and click Run as Administrator. To run a script in the PowerShell console, you can either: Use the full path to script, like: C:\TEMP\MyNotepadScript. ps1.

How do I open PowerShell without Start menu?

Open PowerShell using the Run window A fast way to launch this window is to press the Win + R keys on your keyboard. Then, type powershell and press the Enter key or click OK.


2 Answers

This will open a new window.

Either:

start-process powershell 

Or:

start powershell 
like image 181
Andy Arismendi Avatar answered Oct 26 '22 07:10

Andy Arismendi


if you are trying to open a new window and launch a new script:

start powershell {.\scriptInNewPSWindow.ps1} 
like image 31
jeffski13 Avatar answered Oct 26 '22 08:10

jeffski13