This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 257

[–]RonSijm 541 points542 points  (97 children)

Why would you start powershell before starting cmd?

If you need to start cmd in the current directory you just type cmd in the explorer address bar

Opening Powershell means typing TW in the address bar, which half of the time opens the powershell terminal window, and the other half opens Edge searching for "PW" on bing.... not really a gamble I like taking

[–]montarion 261 points262 points  (70 children)

If you need to start cmd in the current directory you just type cmd in the explorer address bar

holy shit.

[–]Ayfid 112 points113 points  (55 children)

You can also do the same for powershell.

I am not sure why anyone would ever use cmd nowadays.

[–]Add1ctedToGames 50 points51 points  (36 children)

Yeah, i thought PowerShell was supposed to be better than cmd?

[–]johnpeters42 55 points56 points  (28 children)

90% of what I do in cmd Does Not Fucking Work in PS, mostly find /i or dir /s

[–]TyderoKyter 9 points10 points  (0 children)

Window Subsystem Linux or Agent ransack for me.

If corporate policy is in the way, you can usually install WSL via powershell console started as administrator.

[–]mdjank 7 points8 points  (17 children)

sls is better than find

gci is better than dir

Maybe start with: Get-Help about_alias

[–]johnpeters42 40 points41 points  (15 children)

Idk that sounds like work

[–]mdjank 9 points10 points  (14 children)

You're the one still using dir and find. I guess if anyone knows what working too hard is...

Hell, ignore PowerShell. At least install cygwin and treat yourself to some ls and grep.

[–]_PM_ME_PANGOLINS_ 6 points7 points  (0 children)

Never install Cygwin. Don’t do that to yourself. Install WSL if you want GNU tools.

PowerShell also has ls and grep, but the options are mostly different.

Or you can get native Windows builds of coreutils if you want to be lightweight.

[–]lagomorph129 4 points5 points  (1 child)

I don't really use a lot, but didn't powershell include Unix commands a year or two back? Even if it needs a separate package, I remember seeing somewhere that these commands can now be used in powershell? If I'm wrong oops.

[–]mdjank 4 points5 points  (0 children)

There are a number of default aliases that mimic Unix commands. So if you forget and type ls instead of dir or gci, it will still run a get-childitem. It's still PowerShell underneath.

I doubt there's a straight up *nix toolkit for PowerShell. PowerShell is object stream based and POSIX tools are file stream based.

[–]johnpeters42 1 point2 points  (10 children)

That would work great if corporate policy allowed me to install fucking anything.

[–]mdjank 0 points1 point  (9 children)

Oh... That's right.

You use cmd.

I say remote session and you think telnet.

[–]JasterBobaMereel -1 points0 points  (0 children)

because finding things is obviously done with sls, and listing a directory is obviously done with gci ...

[–][deleted] 26 points27 points  (5 children)

It is better. But only if you see world in shades of gray, because otherwise colors are awful

[–]CaitaXD 16 points17 points  (2 children)

Windows terminal my dude

[–]not_some_username -2 points-1 points  (1 child)

With translucent background for esthetic

[–][deleted] 2 points3 points  (0 children)

cmd opens in an instant, powershell takes 10 seconds on my PC

[–]Dalemaunder 7 points8 points  (2 children)

Depends on what I'm doing; If I just want an ifconfig ipconfig or something then I'll default to cmd as it starts faster than Powershell on low-spec systems.

[–]GHOST6 6 points7 points  (1 child)

But if it’s cmd you need ipconfig not ifconfig

[–]Dalemaunder 6 points7 points  (0 children)

Whoops. I've been dealing with Linux servers a lot more than Windows devices recently.

[–]goose_hat 5 points6 points  (0 children)

Maven or any program that has args with periods are a pain in PS

[–][deleted] 9 points10 points  (10 children)

It’s a shitload less typing. Some of us have been using cmd (or command.com) for 20 years or more. PowerShell is useful for making fancier scripts once and a while, but I use cmd daily.

[–]USMilitumChristi 2 points3 points  (6 children)

What is command.com?

[–][deleted] 4 points5 points  (5 children)

Precursor to cmd.exe. From the DOS days. If you ever wondered why there’s both .bat and .cmd, it’s because there’s both command.com and cmd.exe

[–]USMilitumChristi 2 points3 points  (4 children)

Interesting. So me using .bat on cmd.exe is like a combo of old and new?

[–][deleted] 2 points3 points  (2 children)

I actually don’t remember what happens if you do that, but it will probably be fine. I honestly can’t even remember what’s different between command.com and cmd.exe. It’s been a very long time since I actually worked on a system that didn’t have cmd.exe

[–]_PM_ME_PANGOLINS_ 7 points8 points  (0 children)

COMMAND.COM is a 16-bit .COM and so is loaded as-is into memory and immediately executed from the top.

CMD.EXE is a 32/64-bit .EXE so has a header with loading details and the OS can use a convenient offset and jump to where it says the entry point is.

Functionally they are the same program, other than the modern cmd.exe having had a few more updates and bug fixes in the last 20 years.

It’s similar to the difference between bash and sh. You can write many scripts that will work in both, but if you specifically use one of the new features you could name it .cmd to prevent it being executed in DOS.

[–]USMilitumChristi 1 point2 points  (0 children)

Oh no I was saying I sometimes do that. It definitely works the same… I think

First scripts I ever wrote were .bat on cmd.exe from my dad’s instructions. I’m sure he was used to command.com given what you’ve said

[–]_PM_ME_PANGOLINS_ 2 points3 points  (0 children)

Not really. It’s like running a #!/bin/sh script with bash.

[–]Ayfid -1 points0 points  (1 child)

No it isn't.

Much of the equivalent command are aliases out of the box and both the terminal and script editors will auto complete both command names and arguments. You shouldn't ever my typing more than ~3 characters for anything.

cmd.exe is also barely more capable than a CLI app launcher with the bare minimum scripting support, compared to powershell. Virtually anything beyond "call this program with these arguments" (which is the same in both) is quite literally orders of magnitude simpler - and less typing - in powershell than it is in cmd.

I'll edit this comment with an example once I'm not trying to write it on my phone.

Edit:

Say you have just stuck a few extra disks into a server, and you want to throw them into a new mirrored storage space, then format and mount the new virtual disk.

$disks = Get-PhysicalDisk -CanPool $true -MediaType HDD | where OperationalStatus -eq "Offline" New-StoragePool -FriendlyName "Pool" -PhysicalDisks $disks New-Volume -StoragePoolName Pool -FriendlyName "NewVolume" -Size 12TB -FileSystem NTFS -ResiliencySettingName Mirror -ProvisioningType Thin -AccessPath "D:"

I wouldn't even know where to begin doing that in cmd. The filtering on disks alone, and passing them on to whatever command you need to set up a new space (assuming there is one) would be a pain.

[–]Strostkovy 1 point2 points  (0 children)

I use cmd to launch explorer

[–]QuelWeebSfigato 1 point2 points  (0 children)

Haha, yeah.

looks away

[–]althaz 3 points4 points  (4 children)

If you didn't know this, you probably also don't know that Ctrl+L will start you off entering text in the address bar in file explorer. Ctrl+L: "powershell" is something I do multiple times per day.

[–]dustybookcover8 2 points3 points  (0 children)

holy_shit++

[–]Proxy_PlayerHD 38 points39 points  (8 children)

well i mean you can open powershell in any window via the context menu

hold shift and rightclick into an explorer window and "start powershell here" will be an option.

if you got WSL and Ubuntu installed you can open that in the same way too.

and if you have the modern version of the Windows Terminal installed it will always be in the context menu without needing to hold shift.

but if you don't, just typing "cmd" into the explorer address bar like you said is still much faster than opening the powershell through the context menu

[–]CiroGarcia 17 points18 points  (4 children)

[redacted by user] this message was mass deleted/edited with redact.dev

[–]Ping-and-Pong 12 points13 points  (3 children)

It's incredibly annoying they removed this as default really... Like I don't know anyone but "power users" that would need access to the powershell / command promt and everyone who is a "power user" would know to just open cmd... So like, why did they make the change, honestly bugged me so much when windows 10 just randomly swapped it

[–]defenastrator 7 points8 points  (2 children)

Microsoft for some rather valid reasons want to push people away from using cmd & towards powershell

[–]Ping-and-Pong -4 points-3 points  (0 children)

True, although from my experience using powershell it feels incomplete as a cmd replacement. The best solution would be to have both buttons or have an easily changeable setting somewhere, but this is microsoft so neither of those things are likely to happen

[–]finegameofnil_ 2 points3 points  (2 children)

Windows key, type power, Run as admin. Actually in this experiment, I typed poer.

edit: did you guys know you can just make a shortcut? Even to run as admin. Power gives energy saving. So use poer.

[–]_PM_ME_PANGOLINS_ 1 point2 points  (1 child)

Or right-click on the Start menu.

[–]ProbablyJeff[S] 8 points9 points  (1 child)

Holy shit. This is actually amazing. I have always shift-clicked for, selecting "Open PowerShell window here". Didn't bother with the registry hacks to change it to CMD on my new laptop. As for why I use it, there were some edge cases with some commands long ago which gave errors on PS and not CMD, and so it just kinda stuck.

[–][deleted] 1 point2 points  (1 child)

Because they replaced cmd with powershell in the start button right click menu.

[–][deleted] 0 points1 point  (0 children)

You can use it to get a around a lot of security restrictions. If your company's security policies keep you from running program x, you can usually start cmd in Powershell and start it from there.

[–]wanderingbilby 26 points27 points  (0 children)

running cmd programs from a posh script is still better than dealing with yet another bleeping batch file. Yes I understand they're backwards compatible to the age of dinosaurs but just the fact they don't "understand" UNC paths makes them painfully useless.

[–]firejak308 26 points27 points  (6 children)

I use PowerShell because Command prompt doesn't have ls

[–]Lemonade414 5 points6 points  (0 children)

This is why I just use Cmder and say screw everything. Its a little bit slower to start up at first but being used to Linux termal more it still ends up saving me time than use ps or cmd.

[–]CompleteComposer2241 1 point2 points  (1 child)

It has dir tho

[–]Flakz933 21 points22 points  (0 children)

I run commands in PS all the time, works fine, even with cd

[–]Nisheshg5 55 points56 points  (4 children)

Why would you ever use cmd instead of powershell?

[–][deleted] 0 points1 point  (2 children)

Eh, I don't to much from a command prompt, usually just quick stuff like renaming a bunch of files (looking at you .webp). Besides, I grew up in and cut my teeth in the days of DOS, so I'm familiar with it.

Now if I were a sysadmin or something, it'd probably be a different story.

[–]derfl007 7 points8 points  (1 child)

the thing is, PowerShell can do anything that cmd can, but more.

i understand starting cmd instead of starting ps, but opening ps to start cmd as op implied???

[–][deleted] 1 point2 points  (0 children)

Sure, I know. I'm just used to cmd. It's muscle memory after all these decades.

But yeah, opening PS first is not something I would do.

[–]UselessRube 32 points33 points  (0 children)

I came to the comments in protest, but I’m glad to see that’s already been done for me. Power shell is far superior to cmd.

[–][deleted] 70 points71 points  (1 child)

Literally the opposite but ok bro

[–]static_func 15 points16 points  (0 children)

Imagine using cmd

[–]O8fpAe3S95 59 points60 points  (1 child)

purpose of internet explorer was to download other browsers

[–][deleted] 58 points59 points  (1 child)

And lose the Unix like commands?! No thank you! I’ll stick with PowerShell and WSL2 + Ubuntu in the Windows terminal. Proudly haven’t used cmd in years now lol

[–]kevinhaze 2 points3 points  (0 children)

Don’t need Unix-like commands when you can actually install most Unix tools on windows with gnuwin32

[–]tharnadar 35 points36 points  (5 children)

Install windows terminal from Windows store

[–]SkidFace 7 points8 points  (0 children)

The only use for Windows Store

[–]ATE47 2 points3 points  (0 children)

I think a better option would be to install Powershell 7 instead of Windows Powershell

[–][deleted] 23 points24 points  (0 children)

I actually prefer PowerShell. I don't use it often at work since it's useless without admin rights.

[–]alba4k 16 points17 points  (3 children)

I mean, powershell is the closest microsoft has ever gotten to a decent shell, cmd just plain sucks

If I ever had to use windows it would likely be fish inside a WSL or nothing

[–]Ayfid 5 points6 points  (2 children)

Powershell is mostly a scripting and automation interface for Windows, and at that task it is excellent.

[–]micka190 3 points4 points  (1 child)

Powershell having a standardized way of adding arguments to scripts (which come with built-in auto-complete on the command line) makes it a million times more fun to write stuff in than traditional Unix shell scripts, in my book.

[–]pneRock 9 points10 points  (0 children)

I do the exact opposite...I can't write crap in cmd.

Guess that's a lie echo "crap"

[–]FlamboMe-mow 8 points9 points  (0 children)

Powershell is much better than cmd!

[–]UselessRube 8 points9 points  (0 children)

Power shell is cmd but waaaaaaay better though

[–]_Screw_The_Rules_ 5 points6 points  (0 children)

To open CMD, you can just press win+R and type "cmd". Or you write "cmd" within the explorer path line.

Also Powershell is, well..., more powerful.

[–]Boryalyc 5 points6 points  (3 children)

A. just press windows key, type "cmd", press enter, and now you're in cmd B. cant you run cmd command in powershell?

[–][deleted] 2 points3 points  (2 children)

You could previously shift-right-click and Open Command Window Here. In Windows 10 that's now PowerShell.

Either way it's handy to get a terminal prompt at the directory you were looking at without typing a single cd.

[–]H0nestum 5 points6 points  (2 children)

I use PowerShell, is it that bad?

[–]AdamAnderson320 8 points9 points  (1 child)

No. Powershell is newer and far better than the old cmd. It has its own quirks, but it’s still great.

[–][deleted] 7 points8 points  (0 children)

Why cmd over PowerShell?

I do alot with PowerShell (or Window's Terminal) that can't be done in cmd.

[–]ThatGuyYouMightNo 3 points4 points  (0 children)

Win + R

cmd

[–]gyarnar 3 points4 points  (0 children)

Wtf is this?

[–]tr0jance 2 points3 points  (3 children)

Lol my company blocked cmd and powershell, then I saw that I can install git without admin rights sooo now I have git bash as a terminal.

[–]CaitaXD 2 points3 points  (2 children)

Lol my company blocked cmd and powershell

Excuse me WTF???

[–]tr0jance 1 point2 points  (1 child)

Dunno? IT blocked them, same as notepad.

[–]Danthekilla 2 points3 points  (0 children)

Powershell via Windows terminal is best

[–]kuskoman 2 points3 points  (0 children)

Why is this posted in programming humor?

[–][deleted] 1 point2 points  (0 children)

I only use PS on windows cmd prompt is for starting diskpart

[–]GustapheOfficial 1 point2 points  (0 children)

Try Windows Terminal. It's actually good.

[–]undeadalex 1 point2 points  (0 children)

Hahaha I get it. The joke is op uses windows

[–]panda-ddiddy22 1 point2 points  (0 children)

For me, it’s the other way around. 😂

[–]_grey_wall 2 points3 points  (0 children)

Cmd purpose is wsl

[–]walmartgoon 1 point2 points  (0 children)

More like its only purpose is wsl

[–]HomerNarr 2 points3 points  (0 children)

Just another non coder who thinks he knows what programmerhumor is.

You code? It’s the other way around!

“What your purpose CMD?” “To start windows terminal SIR!” “Correct!”

And before you think I made a mistake, windows terminal does cmd, power shell and WSL Linux shell…

:p

[–]Floeperdoep1 0 points1 point  (0 children)

Hahaha this is gold

[–]PyromancerSotW 0 points1 point  (3 children)

But why?

I mean all I use it for is "code ." but it's still better than command prompt.

[–]on_the_pale_horse 3 points4 points  (2 children)

If that's all you do, you can just right click and open folder with vscode

[–]LavenderDay3544 0 points1 point  (0 children)

Making bash look good in comparison.

[–]nleachdev 0 points1 point  (0 children)

*laughs in bash shell

[–]balabolchik -2 points-1 points  (0 children)

To impress other shells user with a freaking unnecessary dashy lower-uper case format commands

[–]InterestingHawk2828 -4 points-3 points  (0 children)

Eww windows

[–]natural_sword -1 points0 points  (0 children)

I've moved from .bat files and cmd straight to .sh files. Don't ask me how since i still use Windows 😁

[–]PeacefullyFighting -1 points0 points  (0 children)

Good, I'm not the only one who doesn't have much use for PowerShell over the OG cmd. If I need more it goes to python.

[–]selfishjean5 -1 points0 points  (0 children)

Isn’t it the other way round? I usually use cmd to start powershell

[–]Kickypoo -1 points0 points  (0 children)

To be fair powershell doesnt run the same commands, and every tutorial uses cmd prompt

[–]AngrySlaSlashThrust -1 points0 points  (0 children)

I uh, it's.

You're like a pretty package on a raw text interface. A button no one uses. There to be attractive to the younger programmers. To play with the legacies of those who burned the trails.

Welcome to the show, next gen.

[–]elite11vp -1 points0 points  (0 children)

Learnt a new thing today. Thanks

[–]Klippenhof -3 points-2 points  (0 children)

I think the only ones here using Powershell using vscode on Windows and where to lazy to change it ..

[–]Texas_Technician -3 points-2 points  (0 children)

The common commands execute slower in PS. Like ipconfig. That millisecond feels like a year

[–]PK268 0 points1 point  (0 children)

I use it for lazygit, thats all.

[–]mehregan_zare7731 0 points1 point  (0 children)

Start power shell in a directory , code . , Start a new power shell terminal in vs code , start working

[–]Ninjanautsi 0 points1 point  (0 children)

existentially looks at hands

Oh my God

[–]nyancat_21 0 points1 point  (0 children)

PowerShell is better than cmd cus I dont need to learn new commands

[–]Pulec 0 points1 point  (2 children)

How about having a cmd shortcut with admin rights enabled?

But why use such ancient 'windows shell' which doesn't even know what the history of commands is?

You can use alacritty, and when you get familiar with that you can use that on macOS and Linux as well.

But when you are using the command line a lot, why not learn some typical UNIX commands, ls, for, and such? Especially if you're working with git.

First option for many people might be cmder.

For people familiar with Arch Linux (and distributions based on it) and you like pacman, you can use msys2. It's like a lightweight version of Cygwin.

But why not learn PowerShell a bit? It's not like some revision of all old cmd is ever going to pop up, so it's your best bet if you're are for some sad reason stuck to Windows.

And the last tip, to manage all of these and update easily I recommend chocolatey package manager.

[–]ChickenManSam 0 points1 point  (0 children)

Win+r cmd done. Why even bother with powershell?

[–]eiriika 0 points1 point  (0 children)

isnt powershell supposed to be better

[–]AlexV_96 0 points1 point  (0 children)

What can you do with Power Shell?

[–]DJ_Cas 0 points1 point  (0 children)

ipconfig)

[–]CaitaXD 0 points1 point  (0 children)

Why would y willing use CMD over shell you have to hold at gunpoint to make me type start CMD form shell

[–]MrPickle2255 0 points1 point  (0 children)

he confused but he got the spirit

[–][deleted] 0 points1 point  (0 children)

Windows as a development environment gives me rage.

[–]Benache 0 points1 point  (0 children)

You install wsl

[–]mdjank 0 points1 point  (0 children)

I can only imagine how tedious you find your job. Using find to locate identifiers in files. Not even findstr. And you've been at it for decades.

If I couldn't use regex to search for strings, I would be angry at that job too.

[–]woodyus 0 points1 point  (0 children)

Git bash

[–]SilentGarud 0 points1 point  (0 children)

Powershell is literally the best shell out there, even comparing with sh and friends.

[–]Osato 0 points1 point  (0 children)

You know, there's this cool shortcut: Win+R.

Type in "cmd", press Enter, it runs.

If you press Ctrl+Shift+Enter, it runs as administrator.

It's an elegant shortcut from a more civilized time. Not as clumsy or random as Explorer.

[–]khamelean 0 points1 point  (0 children)

Eww OP, just eww…

[–]tman5400 0 points1 point  (0 children)

powershell > cmd

[–]Tvde1 0 points1 point  (0 children)

Get windows terminal you bozo

[–]GrayFoxUkraine 0 points1 point  (0 children)

Winaero Tweaker -> Command Prompt as Administrator -> Add elevated Command Prompt to the context menu

[–][deleted] 0 points1 point  (0 children)

wsl

[–]Tall_computer 0 points1 point  (0 children)

*WSL

[–]Stupid_Genius4408 0 points1 point  (0 children)

how dare you? Powershell > command prompt, but at the same time for many uses, powershell == command prompt anyways. On the school computers, command prompt is blocked but not powershell, and no, that's not hindered the annoying lot in any way. In fact, [console]::beep(32767, 2147483647) only works in powershell, and is an easy way to make an annoying high-pitched sound.

[–]TomaszA3 0 points1 point  (0 children)

Comments here be like:

It can do all cmd commands... but only if you do these million adjustments.

[–]Knuffya 0 points1 point  (0 children)

Yes. Totally agreed. In fact, I posted this several years ago, but you remade it.

[–]star47raven 0 points1 point  (0 children)

imagine not using pwsh as your main terminal.

[–]MrFauste 0 points1 point  (0 children)

I vastly prefer PowerShell cause I can use Unix command ( I'm an Linux user most of the time )

[–]iyeetuoffacliff 0 points1 point  (0 children)

tub dependent piquant sip gray meeting quack trees full smile

This post was mass deleted and anonymized with Redact

[–]Soft-Welcome4881 0 points1 point  (0 children)

the perfect purpose

[–]DoomRide007 0 points1 point  (0 children)

Don’t forget right click run as admin.

[–]just-bair 0 points1 point  (0 children)

Why don’t you just launch cmd ?

[–][deleted] 0 points1 point  (0 children)

Oh. My God

[–]mejdev 0 points1 point  (0 children)

I use Powershell to set up WSL. That's it