CMD command doesn't work on PowerShell

Anonymous
2022-08-05T23:51:46+00:00

I'm trying to call 'cmd' inside Windows PowerShell console in order to get to work immediately with Command Prompt mode, but I got this message instead:

I know I can use Command Prompt outside of PowerShell, but this is a special case.

Any suggestions about how can I revert this?

Thank you.

Windows for home | Windows 10 | Settings

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Ramesh Srinivasan 173.7K Reputation points Volunteer Moderator
    2022-08-07T05:29:11+00:00

    Ok. Thanks for the info.

    Right-click Start, click Run.

    Type sysdm.cpl and press Enter

    Click the Advanced tab.

    Click "Environment Variables"

    Under "System variables", select "Path"

    Click "Edit"

    Move the following items to the top by clicking on the "Move Up" button

    • %systemroot%\system32
    • %systemroot%\
    • %systemroot%\system32\Wbem

    Click OK and close the dialog boxes.

    Close and re-open a fresh instance of PowerShell.

    3 people found this answer helpful.
    0 comments No comments

8 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-08-07T18:24:50+00:00

    WORKED! Many thanks!

    I was working on a special project two moths ago allowing me to add some of those variables and had a different order.

    0 comments No comments
  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Anonymous
    2022-08-08T17:07:04+00:00

    Yes, close it.

    0 comments No comments
  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more