Cmd 2 Powershell

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Cleptography
Posts: 287
Joined: 16 Mar 2011 19:17
Location: scriptingpros.com
Contact:

Cmd 2 Powershell

#1 Post by Cleptography » 05 Jun 2011 23:28

Is it possible to execute a powershell command and exit back to cmd?

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: Cmd 2 Powershell

#2 Post by Ed Dyreen » 05 Jun 2011 23:31

Yes,

start "title" /wait "CMD" /c "echo.&pause"
echo. %return%

start "title" /wait /b "CMD" /c "echo.&pause"
echo. %return%

start "title" /wait "powershell" "params"
echo. %return%

What do you want to do ?

Cleptography
Posts: 287
Joined: 16 Mar 2011 19:17
Location: scriptingpros.com
Contact:

Re: Cmd 2 Powershell

#3 Post by Cleptography » 05 Jun 2011 23:44

Good work Ed.
A little integrating between cmd and powershell might be fun.

Post Reply