Discussion:
Powershell Opens new command window?
(too old to reply)
Tom
2017-09-25 17:03:51 UTC
Permalink
Greetings,

I've gotten my machine into a strange strange state and not sure how to correct this. If I type "more <file>" or "systeminfo" a Windows Command prompt opens and the command is run then close the window. How do I tell Powershell to run in the current window without opening a new window? I'm running 2.0 on Windows 7.

Thanks in Advance for any help.

Tom
MaxW
2017-09-26 14:15:04 UTC
Permalink
Post by Tom
Greetings,
I've gotten my machine into a strange strange state and not sure how to correct this. If I type "more <file>" or "systeminfo" a Windows Command prompt opens and the command is run then close the window. How do I tell Powershell to run in the current window without opening a new window? I'm running 2.0 on Windows 7.
Thanks in Advance for any help.
Tom
Tom,

I'm not experiencing that behavior on either Windows 10 or Windows 7 (although both have PS 5, not 2). Maybe try preceding your commands with an ampersand ('&')?
Tom
2017-09-27 17:08:24 UTC
Permalink
Post by MaxW
Post by Tom
Greetings,
I've gotten my machine into a strange strange state and not sure how to correct this. If I type "more <file>" or "systeminfo" a Windows Command prompt opens and the command is run then close the window. How do I tell Powershell to run in the current window without opening a new window? I'm running 2.0 on Windows 7.
Thanks in Advance for any help.
Tom
Tom,
I'm not experiencing that behavior on either Windows 10 or Windows 7 (although both have PS 5, not 2). Maybe try preceding your commands with an ampersand ('&')?
Thanks, unfortunately that didn't work. I'm wondering if it's the anti-virus program that's causing the problem....
Continue reading on narkive:
Loading...