Is CMD subset of Windows PowerShell?

  • Thread starter yungman
  • Start date
  • Tags
    Computing
  • #1
yungman
5,718
241
Hi

I never learn CMD all these years. I am getting a little more into computer, PowerShell is completely new to me. I just want to get opinions from you experts whether I should learn PowerShell or just learn CMD.

I read articles that CMD literally a subset of PowerShell.

I am not that into IT or anything, just want to learn a little. Should I just learn CMD alone?

Thanks
 
Last edited:
Computer science news on Phys.org
  • #3
berkeman said:
I've mostly use CMD in my work, but also looked briefly at Powershell a couple years ago for some specialized tasks. Others can give you good answers, but I did a Google search on CMD vs Powershell and got lots of good hits:

https://www.google.com/search?client=firefox-b-1-e&q=cmd+vs+powershell&bshm=rimc/1
So CMD is more popular? I don't want to learn more than I need. I just want some idea. I learn computer after DOS, never get into it before. Just want to learn some.

Thanks
 
  • #4
yungman said:
So CMD is more popular? I don't want to learn more than I need.
You should know by now that you should not trust my word on this stuff... :wink:

CMD commands are pretty fundamental to using Windows/DOS boxes and scripting. When I looked at Powershell I was trying to figure out how to use the linux "expect" command reliably on Windows. It's a more advanced command that you would only look at using in specialized circumstances, IMO.
 
  • Like
Likes Tom.G and yungman
  • #5
berkeman said:
You should know by now that you should not trust my word on this stuff... :wink:

CMD commands are pretty fundamental to using Windows/DOS boxes and scripting. When I looked at Powershell I was trying to figure out how to use the linux "expect" command reliably on Windows. It's a more advanced command that you would only look at using in specialized circumstances, IMO.
I've been away from Windows for a long time (I'm happy to say. POSIX offers so much more control but of course Windows is still an industry standard and won't be going away anytime soon.)

There's a lot of easily accessible information about the differences between PowerShell and CMD:

Just off the top of google:

How PowerShell Differs From the Windows Command Prompt

What's new in PowerShell Docs for 2023PS.:

Is "debug" also a command in PowerShell? :)
 
  • #6
berkeman said:
You should know by now that you should not trust my word on this stuff... :wink:

CMD commands are pretty fundamental to using Windows/DOS boxes and scripting. When I looked at Powershell I was trying to figure out how to use the linux "expect" command reliably on Windows. It's a more advanced command that you would only look at using in specialized circumstances, IMO.
I think I am going to learn CMD first. I already starting to learn how to change directory like file explorer using "cd" and "cd..". Using TAB to do shortcut.

Thanks
 
  • Like
Likes berkeman
  • #7
berkeman said:
You should know by now that you should not trust my word on this stuff... :wink:

CMD commands are pretty fundamental to using Windows/DOS boxes and scripting. When I looked at Powershell I was trying to figure out how to use the linux "expect" command reliably on Windows. It's a more advanced command that you would only look at using in specialized circumstances, IMO.
I learned some of the commands in CMD like cd, TAB to scroll through directory alphabetically, dir, cls, dir * etc. They ALL work in Powershell. So far the only one that doesn't work is "/a" to view hidden files.

I am not done yet, I only gone through 1/2 of the 9 part series on CMD commands.
 
  • #8
Try the /? option to dir. dir /?

Many (all?) commands, and even programs, accept the /? to show a list and descriptions of their known options.

Cheers,
Tom
 
  • #9
yungman said:
So CMD is more popular?
It's older and a lot less sophisticated than PowerShell. The CMD commands date from the time before Windows was released when IBM PC clones ran some form of DOS, like PC-DOS or MSDOS.
 
  • Informative
Likes berkeman

1. Is CMD a subset of Windows PowerShell?

Yes, CMD (Command Prompt) is considered a subset of Windows PowerShell. Windows PowerShell is a more advanced and powerful command-line interface compared to CMD, but it includes many of the same commands and features.

2. What is the main difference between CMD and Windows PowerShell?

The main difference between CMD and Windows PowerShell is that CMD uses commands based on the old MS-DOS operating system, while Windows PowerShell uses a more modern and advanced scripting language. This allows for more complex and automated tasks to be performed in Windows PowerShell.

3. Can CMD and Windows PowerShell be used interchangeably?

No, although there are similarities between CMD and Windows PowerShell, they are not completely interchangeable. Some commands and features are unique to each interface and may not work the same way in the other.

4. Which is better to use, CMD or Windows PowerShell?

This depends on the specific task you are trying to accomplish. For simple tasks, CMD may be easier to use. However, for more complex and automated tasks, Windows PowerShell is the preferred choice due to its advanced scripting capabilities.

5. Are CMD and Windows PowerShell included in all versions of Windows?

Yes, both CMD and Windows PowerShell are included in all versions of Windows. However, Windows PowerShell may not be enabled by default on older versions of Windows, such as Windows 7 or earlier.

Similar threads

  • Programming and Computer Science
Replies
12
Views
3K
  • Computing and Technology
Replies
12
Views
509
  • Computing and Technology
Replies
6
Views
2K
  • Programming and Computer Science
Replies
7
Views
683
  • Computing and Technology
Replies
4
Views
2K
Replies
17
Views
825
Replies
9
Views
2K
  • Programming and Computer Science
Replies
1
Views
1K
  • Computing and Technology
Replies
23
Views
2K
  • Programming and Computer Science
Replies
2
Views
859
Back
Top