Windows Powershell vs Command Prompt: What's The Difference Anyway?

  Рет қаралды 681,082

ThioJoe

ThioJoe

Күн бұрын

IS POWERSHELL JUST A BLUE COMMAND PROMPT?
⇒ Become a channel member for exclusive features! Check it out here: kzbin.infojoin
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Merch ⇨ teespring.com/stores/thiojoe
⇨ / thiojoe
⇨ / thiojoe
⇨ / thiojoetv
My Gear & Equipment ⇨ kit.co/ThioJoe
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#Windows #Tech #ThioJoe

Пікірлер: 1 400
@ThioJoe
@ThioJoe 3 жыл бұрын
Here's the link to the script I made for those wondering: github.com/ThioJoe/youtube-dl-easy
@Zanaso12
@Zanaso12 3 жыл бұрын
You just have to hit tab after you've typed in the first 3 letters of the file/folder/cmdlet name...also you could convert your Powershell script into a Function and add it to your PSProfile (type "notepad $PROFILE" and save the resulting file to edit later). Then you can run the function with any name you want without navigating to the directory.
@serpent77
@serpent77 3 жыл бұрын
The reason why PS doesn't run an executable, even if you're in the directory for it is a safety feature that linux has had for many years. It prevents someone from dropping a malicious exe in the directory with the same name as a common command (like "ls" or "dir") that runs automatically instead of the built in command to do fun things like installing rootkits.
@salty_lemon390
@salty_lemon390 3 жыл бұрын
Can I have a free pc I’m broke
@michael9651
@michael9651 3 жыл бұрын
Errors are red, my screen is blue, I think deleted system 32
@cristieq05
@cristieq05 3 жыл бұрын
🤔...was actually how I was looking at your video lmao!!!
@latt.qcd9221
@latt.qcd9221 3 жыл бұрын
CMD Prompt: "Who are you?" Powershell: "I'm you, but bluer."
@bultvidxxxix9973
@bultvidxxxix9973 3 жыл бұрын
CMD Prompt: *color 1F* Powershell: "..."
@redjoker07
@redjoker07 3 жыл бұрын
...but more advanced
@abrahamalaniz3468
@abrahamalaniz3468 3 жыл бұрын
Cmd is actually really dangerous due to it able to communicate directly with the OS
@Matt-wu1nu
@Matt-wu1nu 3 жыл бұрын
@@bultvidxxxix9973 PowerShell : But im new version of you...
@juango500
@juango500 3 жыл бұрын
QBASIC: Who are you? Microsoft Disk Operating System: I'm you, but better. Microsoft Disk Operating System: Who are you? CMD Prompt: I'm you, but better.
@Falaxuper
@Falaxuper 3 жыл бұрын
I can't wrap my mind around how this guy went from telling people to pickle their iPhones in hand sanitizer for free mobile data to making actually informative, well-structured videos
@thepoliticalstartrek
@thepoliticalstartrek 3 жыл бұрын
I do miss those videos. It is hard to continue my commwnt themes I use to do. It was I put Maximum Overdrive into a thing and now it is trying to kill me.
@AdrianHoffsten
@AdrianHoffsten 3 жыл бұрын
I still don't trust him 😬
@impmadness
@impmadness 3 жыл бұрын
He just got tired I guess, it was a different time, more people fell for that and he needed the views lol. It missed the joke if everyone knew it was fake
@xbotscythe
@xbotscythe 3 жыл бұрын
@@impmadness yeah plus with people not falling for it much anymore he was able to take advantage of that and move his second channel style videos to this one
@hunzhurte
@hunzhurte 2 жыл бұрын
Well he actually worked on coding many infamous Windows 10 features so it makes sense that he understands it so well.
@shreevardhanshenoy
@shreevardhanshenoy 3 жыл бұрын
For those in a hurry Powershell = blue command prompt with yellow font
@Brahvim
@Brahvim 3 жыл бұрын
*and more stuff to do, LOL!
@callsigndap
@callsigndap 3 жыл бұрын
With Linux terminal commands
@derrick_martin_g.
@derrick_martin_g. 3 жыл бұрын
Powershell can be customized. Right-click top of window> select properties and get crazy...kinda.
@laurinneff4304
@laurinneff4304 3 жыл бұрын
@@derrick_martin_g. can be done with everything that uses conhost.exe to display, so you can do it in cmd and most cli programs too
@Dhruvinator
@Dhruvinator 3 жыл бұрын
l m a o
@TheCreeperyXYZ
@TheCreeperyXYZ 3 жыл бұрын
The house and background looks lit
@Freakazoid12345
@Freakazoid12345 3 жыл бұрын
Because everything is white?
@AyrisX86
@AyrisX86 3 жыл бұрын
@@Freakazoid12345 the cushions are not white so whoops
@uwu-zl6tq
@uwu-zl6tq 3 жыл бұрын
you look lit today! :D
@Freakazoid12345
@Freakazoid12345 3 жыл бұрын
@@AyrisX86 Yes, I'm obviously not talking about the things that don't apply.
@AyrisX86
@AyrisX86 3 жыл бұрын
@@Freakazoid12345 bruh
@gosnooky
@gosnooky 3 жыл бұрын
The .​/ is from Linux - and must be specified to execute within the current directory as opposed to an executable in $PATH. This is to help avoid name collisions.
@loc4725
@loc4725 3 жыл бұрын
And for security reasons.
@scayzee8174
@scayzee8174 3 жыл бұрын
Same thing for the "-eq" instead of "==" for equality test, look like its imported from bash, because behind the scene, the if statement is kinda a program
@megafan1533
@megafan1533 2 жыл бұрын
yeah ./ is for linux
@jamesbannon1057
@jamesbannon1057 2 жыл бұрын
@@loc4725 Yep. Having the current working directory in PATH is a security no-no. I like how he made a big deal of pipes. People of a certain age, i.e. old gits like me, know that pipes have been around since the year dot, as has redirection. What is more, the concepts are much older than linux (a good thirty years at least). Really, Powershell is just the Bourne shell, albeit implemented slightly differently.
@becon8575
@becon8575 2 жыл бұрын
You are a chad
@RobertGrimm
@RobertGrimm 3 жыл бұрын
The things you find weird in Powershell are standard ways of doing things from Unix that have been around forever. Using -eq in an if statement is useful because you can use other things in place of it to do other tests. Instead of checking to see if a string or numeric value is equal to something else, you could test something like whether a file exists or what kind of file something is. That's strange for other kinds of languages but it makes good sense in a shell scripting language. As for having to specify the local directory with .\ to run a program in the current directory, that's a security feature that has also been around forever in Unix. Imagine you're sitting in your home directory and you want to run something like ping. The standard Windows version is in your $PATH but your current location isn't. Maybe something malicious put a bad version of ping in your home directory. You want the real one, not the dangerous one, so running things in the local directory is blocked unless directly specified and the system looks to the $PATH to find it.
@noxagonal
@noxagonal Жыл бұрын
I think there could also be an alias for "==" which would translate to "-eq". You wouldn't lose functionality but could potentially make the script more clear. I think I'll stick with Python for scripts though. I agree on your second point though, even if I found it a little annoying at first.
@user-ir6xh2mx9d
@user-ir6xh2mx9d Жыл бұрын
@@noxagonal OMG I can't believe we thought the same thing. I was also thinking of "==" for "-eq" One work around for this that I can think of is espanso.
@ptorq
@ptorq 4 ай бұрын
Not running executables in the current directory by default is probably also a Unixism: if you default to running executables/scripts in the current directory, a malicious actor could put an executable named "ls" in a directory and if root were to go into that directory and try to get a listing of the files, they'd run that ls program with root privileges. For non-root users it's less of a problem but it would still be possible to have it, say, delete all the files in the user's home directory. Excluding the current directory from the path means that you have to specifically say "yes, I want to run the program in THIS directory", making it safer.
@tompycz2225
@tompycz2225 4 ай бұрын
@@noxagonal there is == in bash, it just has different functionality. It's string equivalency.
@noxagonal
@noxagonal 4 ай бұрын
@@tompycz2225 Right, that just makes it even more confusing. XD Anyways, old convo. I'll stick with python because familiarity and for cross platform compatibility.
@zsin128
@zsin128 3 жыл бұрын
easy: one looks cool,and can change theme without activining windows. other one looks anicent but its faster /s
@zsin128
@zsin128 3 жыл бұрын
@NitroNite72 well I was locking at "windows central" website, talking about how to make light and dark theme switch during different periods. That commend (that's supposed to be timed) changes theme on powershell even when windows isn't activated
@ChrisTian-sd5yq
@ChrisTian-sd5yq 3 жыл бұрын
@@zsin128 So you locked it?
@thepyro7845
@thepyro7845 3 жыл бұрын
Sorry if i sound like a dick by saying this, but what does /s mean exactly?
@RotatingBuffalo
@RotatingBuffalo 3 жыл бұрын
@@thepyro7845 /s is used to signal the end of a use of sarcasm. it comes from HTML, where you start a body of text with and end it with , where "something-here" would really be something more descriptive, like the size the text should be, if it's a link, etc.
@thepyro7845
@thepyro7845 3 жыл бұрын
@@RotatingBuffalo ok thanks
@Caracazz2
@Caracazz2 3 жыл бұрын
I'm learning english and this is the only channel I can understand everything without subtitles. You have a good diction.
@Naids
@Naids 3 жыл бұрын
English isn’t my native language as well and I totally agree with you☝️
@blackghost6973
@blackghost6973 3 жыл бұрын
I'm also not a native speaker and I find Thio's accent very understandable, although he speaks a little bit too fast 😅
@twb0109
@twb0109 3 жыл бұрын
If you're also into Linux I highly recommend DistroTube and OldTechBloke, they speak very clearly
@iyeetsecurity922
@iyeetsecurity922 2 жыл бұрын
I've been bouncing on my boys diction for hours to this.
@neoqueto
@neoqueto 3 жыл бұрын
Big brain mode: PS C:\Users\User> cmd
@neoqueto
@neoqueto 3 жыл бұрын
@TheThunderGuyS more like Linux + Windows
@saturniunyttech679
@saturniunyttech679 3 жыл бұрын
@TheThunderGuyS according to Saturniun YT, Windows > macOS > Linux
@micr0116
@micr0116 3 жыл бұрын
@@saturniunyttech679 TempleOS > Windows > macOS = Linux
@saturniunyttech679
@saturniunyttech679 3 жыл бұрын
@TheThunderGuyS it's my name dude, or should I say darude
@justsomerandompersononthei2595
@justsomerandompersononthei2595 3 жыл бұрын
Saturniun YT Me: Linux > MacOS > Windows
@Tarucz
@Tarucz 3 жыл бұрын
Microsoft: We are removing command prompt. People in 2025: Only the OG remember command prompt.
@redd_cat
@redd_cat 3 жыл бұрын
They literally can't do that. They would break hundreds of thousands of devices, including critical equipment in hospitals and probably even oil rigs.
@jase_allen
@jase_allen 3 жыл бұрын
Some of us still remember the DOS prompt.
@Eshaal74
@Eshaal74 3 жыл бұрын
@@szymex8341 r/wooosh
@tallgeese1
@tallgeese1 3 жыл бұрын
You'd be surprised how dependant many enterprises, SMBs, and some older CNC machines software are on the old conhost.exe and cmd.exe. Had Microsoft decided to fully remove them and replace it with PowerShell, it would be disastrous to services dependent on the 30yr+ old conhost and cmd.
@MESYETI
@MESYETI 3 жыл бұрын
wine cmd
@smft9147
@smft9147 3 жыл бұрын
You can't even watch star wars in powershell :/
@lavleshdubey3338
@lavleshdubey3338 3 жыл бұрын
But you can see in the cmd 😎
@trogdorstrngbd
@trogdorstrngbd 3 жыл бұрын
It still works in PowerShell.
@smft9147
@smft9147 3 жыл бұрын
@@trogdorstrngbd it's better in cmd powershell is for noobs
@lavleshdubey3338
@lavleshdubey3338 3 жыл бұрын
@@smft9147 well, I don't think so because thiojoe said that powershell is more advanced then cmd.
@smft9147
@smft9147 3 жыл бұрын
@@lavleshdubey3338 it is only real ones use cmd powershell is for noobs lmao
@MichaelStepniewski
@MichaelStepniewski 3 жыл бұрын
Command prompt also supports pipes. It just does text instead of objects which powershell does like you mentioned in the video. Just wanted to share that you can use piped output far before powershell ever existed.
@tertia4808
@tertia4808 Жыл бұрын
Yeh, Powershell users - put that in your pipe & smoke it.
@darrennew8211
@darrennew8211 Жыл бұрын
You can also set variables, branch and loop, etc. It's just rather uglier. :-)
@tazguy371
@tazguy371 Жыл бұрын
Please give me an example of piping the output of one command to another, and then piping that output to a third in cmd.exe.
@thorbjrnhellehaven5766
@thorbjrnhellehaven5766 Жыл бұрын
The piping command I used the most, is probably |more Pipes screen output through more, to display one by one screen Useful when your command/program just print to screen, and has no option to stop for every full screen. Can't think of another piping command I have used and remember specifically. I know I have used some, but not enough to remember any of them. The closest thing, would be redirect output to printer { > prn }, or to text-file
@wolfgangeigner989
@wolfgangeigner989 5 ай бұрын
@@tazguy371 dir|sort|more it's pretty useless to sort the current directory by day of month but it works
@arijitdas7526
@arijitdas7526 3 жыл бұрын
How I use powershell... "Start cmd"
@j.w.techchannel
@j.w.techchannel 3 жыл бұрын
I've never actually used PowerShell before.. (No one cares)
@jaden8923
@jaden8923 3 жыл бұрын
I only use powershell for ps1 scripts and stuff like that
@joshualepdung
@joshualepdung 3 жыл бұрын
😂
@NazmusLabs
@NazmusLabs 3 жыл бұрын
@Lucas Zhu Windows Terminal doesn’t have powershell or cmd. It’s a terminal application that can run many CLI shells. It runs the same powershell.exe and cmd.exe from the System32 folder as the regular “cmd window”. In fact, the “old command prompt” isn’t a black terminal Window. When you launch “old” CMD, Windows launches the a built-in terminal app called “Windows Console Host” (conhost.exe), and then cmd.exe (the same one that the new Windows terminal uses) launches inside conhost.exe. When you launch “old” powershell, it, too, runs conhost.exe sets background color to blue and then launches PowerShell.exe inside conhost.exe Windows terminal is a replacement conhost.exe. The actual cmd.exe is the same old one and ISN’T open source. Powershell is open source
@tooru
@tooru 3 жыл бұрын
1. There's nothing wrong at all with nested if-s in Batch: if 1 == 1 ( if 2 == 2 ( echo yas ) else ( echo no ) ) 2. You have to launch programs with *./* because otherwise it's a security vulnerability. Imagine you download some archive with many many files, you extract it and _cd_ into it. Then you run _dir_ but this archive already comes with its own dir.exe, which in turn could be malicious, so that's why current directory is not automatically added to your PATH.
@mffmart
@mffmart 3 жыл бұрын
I commented on the dot-slash notation and didn't even consider this. It is a very valid point, good one!
@black_platypus
@black_platypus 5 ай бұрын
I had the same thought. IIRC, a common problem with nested conditionals/loops in CMD is that all levels get evaluated at once, breaking what would otherwise be an intuitive experience. If you need to refer to something that changed in the meantime between the outer and the inner scope, you can use _setlocal enabledelayedexpansion_ to defer expansion/evaluation to when the program flow gets there, not to when the outer scope gets interpreted
@enzoys
@enzoys 2 жыл бұрын
I'm always amazed by how much more information I actually get from your videos than I could ever expect, good job!
@tallgeese1
@tallgeese1 3 жыл бұрын
The "./" token is a PowerShell security feature that insures the intended application or script is run from the current directory and not an application of the same name in the system or user path that could be potential malware or incompatible application version that may be on a system. Not stupid.
@NoOne-sy5fg
@NoOne-sy5fg 2 жыл бұрын
It's not an original "feature". It was copied from unix
@patrickflannigan8939
@patrickflannigan8939 2 жыл бұрын
Great informative video. I'm a systems administrator and I got my most recent job thanks to powershell. During my interview I displayed how I had automated the deployment and configuration of virtual machines to automatically spin up game servers all in powershell and python. Without powershell I wouldn't have the decent lifestyle I have today. This video is a great primer on the basic concepts of powershell, it was really well done. You're clearly knowledgeable about what you're talking about and well researched. Keep up the great work.
@RuxUnderscore
@RuxUnderscore 2 жыл бұрын
To add to this video for those that are more technical. A lot of the syntax and aliases used by PowerShell were created to provide less of a learning curve for those of us more attuned to bash scripting/Linux terminals. If you look at a PowerShell script compared to a more advanced bash script you can see similarities other than the PowerShell-only commands. (echo instead of Write-Host and so on). With this knowledge, someone who is adept with either scripting language can fill in the blanks and learn the other with relative ease.
@f1ncc246
@f1ncc246 3 жыл бұрын
7:15 cd is not the cmd command for bash's ls, dir is
@ThioJoe
@ThioJoe 3 жыл бұрын
Sathya yea I mis-spoke
@Preinstallable
@Preinstallable 3 жыл бұрын
In powershell cd is Set-Location Dir is Get-ChildItem
@megafan1533
@megafan1533 2 жыл бұрын
ls is for linux
@xXJ4FARGAMERXx
@xXJ4FARGAMERXx 2 жыл бұрын
This comment needs more punctuation
@PearComputingDevices
@PearComputingDevices 3 жыл бұрын
This reminds me a lot of the differences between OS/2 shell and command shell in OS/2. Basically you can do just about anything you would do in command shell in OS/2 shell but a whole lot more. OS/2 was quite powerful in its day.
@DTGplays
@DTGplays 2 жыл бұрын
Finally someone making comparison videos the right way. Great work man!
@junedkhan4643
@junedkhan4643 3 жыл бұрын
i love how you talked about this on your couch.
@ethimself5064
@ethimself5064 3 жыл бұрын
I drove my old XP into the ground to see how long it would last online after support stopped - over 2 yrs. I have had 10 now for 2 yrs and caught on well due to the fact that I was spending 25 hrs/week maintaining XP for about 8 months. I have been learning a lot about the complexity of 10 and it does impress me all in all. Thanks for the online help. 👍👍
@MrNaporowski
@MrNaporowski 3 жыл бұрын
Those oddities in PowerShell you mentioned (like writing -eq instead of =) aren't really oddities because as it turns out this is how you write in bash (the most popular Linux command shell) as well. However, in bash you can also use a legacy method with = instead of -eq, for example, but the syntax is a little different. The same is the case with adding ./ before running a script.
@hwstar9416
@hwstar9416 4 ай бұрын
them being on linux doesn't make them good. Weird way to think
@anthaguz
@anthaguz 3 жыл бұрын
This is just a 13 minute video... I can't believe that in only 13 minutes you were able to create the best video I have ever seen to explain Powershell basics to any of my peers in such a short time, this is honestly just amazing!
@yosefgebrewold2005
@yosefgebrewold2005 Жыл бұрын
More than five years I have struggled a lot to fix my PC, even I lost some videos and a lot of files I had saved. I tried some maintenance but I got no solution even my window installation was corrupted and I have also lost two laptops b/c of these previously but now b/c of your support and other similar tutorials I have learned how to fix all the problems and my PC is clean and faster than I expected. Thank you for all your support and good advice's. GBU!
@workethicrecords5901
@workethicrecords5901 3 жыл бұрын
My guess as to what the -eq thing is about, is that it looks like all variables in powershell are objects, since you don't have to declare types. In object oriented languages, you have to use a separate command for finding out equivocation, because the raw value for objects is their location in memory, not their contents.
@1tsMichael
@1tsMichael 3 жыл бұрын
Teacher: opening another tab will close the main tab Me with powershell doing math: i can’t hear you
@SYS_Alberto
@SYS_Alberto 3 жыл бұрын
Command Prompt: black Powershell: I'm blue Da ba dee da ba di Da ba dee da ba di
@SYS_Alberto
@SYS_Alberto 3 жыл бұрын
I use powershell for chocolatey.
@ThioJoe
@ThioJoe 3 жыл бұрын
Alberto C. Routwell stop right there
@ysnsmth
@ysnsmth 3 жыл бұрын
@@ThioJoe bruh
@graceperez9672
@graceperez9672 3 жыл бұрын
ThioJoe why? Do you not like the song?
@alwinvillero4404
@alwinvillero4404 3 жыл бұрын
*dat esh tee tee pee es colon slesh*
@gavincstewart
@gavincstewart 3 жыл бұрын
Excellent video. I've been wanting a closer look at these two for a while, and you did a great job explaining the difference. I will start using PowerShell from now on.
@theadhdunicyclist
@theadhdunicyclist 3 жыл бұрын
Hey, really great video! I love this layout of the video and the laid back environment fits your videos perfectly. Nice job!
@ForceGamerrr
@ForceGamerrr 3 жыл бұрын
The reason you have to type the " ./ ", is because by default, Powershell (and Bash + other shells) will look for commands in a commands folder, like where that PING.EXE was, for example. So you have to specify that you want to execute the command that is in your working directory.
@user-ko2rb2ky1z
@user-ko2rb2ky1z 3 жыл бұрын
that makes alot of sense actualy
@sethadkins546
@sethadkins546 3 жыл бұрын
Also prevents security issues in case you install some malware, and when you go to the directory where it's installed and you type in "dir" or "ls" it would run "dir.exe" (malware) or "ls.exe" (also malware).
@Kris_M
@Kris_M 3 жыл бұрын
10:26 Of course you can use nested IF statements in batch files. Also ELSE and ELSE IF.
@igorthelight
@igorthelight 3 жыл бұрын
So as pipes :-)
@Avighna
@Avighna 3 жыл бұрын
r/foundthecmdfans
@sophisticatedserpent1512
@sophisticatedserpent1512 3 жыл бұрын
Wtf was that intro! Absolutely Genius! The way that you stylishly stuck your head out from behind the couch while unemotionally saying "Windows" with no context. Amazing.
@NealKlein
@NealKlein 3 жыл бұрын
I really like this guy's presentation. Not too flashy, and easy to follow.
@johngeverett
@johngeverett 3 жыл бұрын
Good introduction. THANKS! BTW - MSDOS commands will pipe output and input.
@mervstar
@mervstar 3 жыл бұрын
I do all sorts of piping with > | < in CMD. Always have....always will.....
@sethadkins546
@sethadkins546 3 жыл бұрын
@@abdulelahfallatah > writes the output to something. | is for piping. For example, echo 1 > C:\example.txt would write 1 to example.txt
@Preinstallable
@Preinstallable 3 жыл бұрын
| pipe >make file from output >>append output to file
@Demonslay335
@Demonslay335 3 жыл бұрын
His point is how PS is better (more elegant) about it. For example, say you want to iterate all files in a folder and run a command on each one. In batch, you have to do some goofy tokenizing and parsing out of the dir command, because it just spits out a blob of text, where parts of it are not related to what you want (e.g. file size and attributes). PowerShell can just pipe a cmdlet version to a simple loop that understands the output without you having to "parse" it yourself.
@VivekYadav-ds8oz
@VivekYadav-ds8oz 3 жыл бұрын
The reason for the "./program.exe" is to make it more similar to Linux syntax. In Linux, without the ./, the program is assumed to be in the /bin directory, so you need to explicitly state that your program is in the current folder. This is the same case in PowerShell.
@tazguy371
@tazguy371 Жыл бұрын
The reason this was done in PowerShell was so that someone could not write a script (malicious or otherwise) with the same name as a PowerShell cmdlet, advanced function or alias (e.g. dir), and have the script run instead of the cmdlet, function or alias.
@Lightn0x
@Lightn0x 5 ай бұрын
The reason is not to to be similar to linux, it's to combat a security threat. It just so happens that Linux also faces the same threat, so both addressed it in the same way. Similarity to linux is an effect, not the cause.
@RigelVision
@RigelVision 9 ай бұрын
The new windows terminal with oh-my-posh looks awesome 👍🏻
@physnatics7959
@physnatics7959 2 жыл бұрын
This is awesome. I've been wondering about the difference between these two terminals for a long time. Thanks for the clear and easy to follow explanation!
@minastaros
@minastaros 5 ай бұрын
Don't confuse "terminal" with "shell". The terminal is the program that has a window, accepts key strokes and displays characters. The shell is the program that runs and _processes_ input, reads files, does stuff, and generates output (which is then displayed by the -> terminal). You can run powershell in the old cmd terminal (and vice versa). Turns out, the standard powershell terminal is just the old one but blue. So better install the new "Windows Terminal" which has tabs, more configurability, and a faster output engine.
@bernardonegri5416
@bernardonegri5416 3 жыл бұрын
I used to not like Powershell's font but then Windows Terminal came out.
@Stridsvagn69420
@Stridsvagn69420 3 жыл бұрын
same, but I also didn't like the blue background
@octavylon9008
@octavylon9008 3 жыл бұрын
i like terminals font, anyways im pretty sure theyll add an option to chanhe it in a future update
@derrick_martin_g.
@derrick_martin_g. 3 жыл бұрын
@@octavylon9008 Powershell can be customized. Right-click top of window> select properties and get crazy...kinda.
@derrick_martin_g.
@derrick_martin_g. 3 жыл бұрын
@@Stridsvagn69420 Powershell can be customized. Right-click top of window> select properties and get crazy...kinda.
@Python_P
@Python_P 3 жыл бұрын
@@Stridsvagn69420 powershell is customisable tho
@billdimz
@billdimz 3 жыл бұрын
Pipes can also be used in Command Prompt.
@o0Donuts0o
@o0Donuts0o 3 жыл бұрын
Yes you can but powershells pipe let's you manipulate the pipeline based on the members coming down the pipeline. Run a gci | gm and look at the members of a file. You can use any combination of the members to manipulate the output
@__Nero__
@__Nero__ 3 жыл бұрын
Thanks, learnt a lot. I'm not likely to switch over to Powershell for the basics that I need but great to know about for the future.
@danielfernandes1010
@danielfernandes1010 3 жыл бұрын
Thank you. I always saw powershell only as a program for some advanced people who worked with hundreds of computers in a corporate setup. After watching this I think it has some pretty cool uses for us as well.
@tazguy371
@tazguy371 Жыл бұрын
PowerShell definitely shines when you have multiple machines that you need to configure the same way. If you need to keep the configuration the same without allowing changes to the installed Windows features, PowerShell can do that as well.
@tanc_
@tanc_ 3 жыл бұрын
"you have to use -eq which is stupid" Me after 3 years of ksh 👀
@Stevesteacher
@Stevesteacher 3 жыл бұрын
Theo-kun... You're underestimating CMD, you're denying a lot of things it can actually do (such as creating variables and using nested if statements) But I enjoyed the video, thanks for the information :D
@Digital-Dan
@Digital-Dan 3 жыл бұрын
Agreed. Complete systems have been written in the Unix/Linix shells, and cmd isn't too far behind, if any. Pretty clumsy, but you get used to it.
@PaulJohnsonM
@PaulJohnsonM 3 жыл бұрын
And you can redirect output into other programs. Remember "type file.txt | more"?
@sethadkins546
@sethadkins546 3 жыл бұрын
@@abdulelahfallatah %[variable]% I'm pretty sure is just environment variables.
@sethadkins546
@sethadkins546 3 жыл бұрын
@@PaulJohnsonM Exactly, pipelines are even a thing in bash/zsh as well, but i think PS does it slightly differently.
@genjimccorkle5518
@genjimccorkle5518 Ай бұрын
Learning powershell right now for work and this video is an absolute gem.
@diskeed
@diskeed 3 жыл бұрын
Thx much for this -- for me a very useful intro to the Powershell (and why I might have to expand my horizons beyond the trusty ole DOS prompt)
@smft9147
@smft9147 3 жыл бұрын
I use Cortana for all my windows commands
@quintessence2183
@quintessence2183 3 жыл бұрын
Microsoft should make a robot with Cortana built in. Make it thicc.
@cscscscss
@cscscscss 3 жыл бұрын
"Hey Cortana, format my C drive"
@quintessence2183
@quintessence2183 3 жыл бұрын
@@cscscscss Hey Cortana, I have a problem with my D drive.
@k4tbo116
@k4tbo116 3 жыл бұрын
Progamermovelol.
@lavleshdubey3338
@lavleshdubey3338 3 жыл бұрын
@@cscscscss 😂😂😂
@mjdxp5688
@mjdxp5688 3 жыл бұрын
It feels weird that Windows 10 still has an MS-DOS shell decades after MS-DOS was released, honestly PowerShell should be the main, default command shell, while the MS-DOS shell should be an optional install, however backwards compatibility and all that...
@smft9147
@smft9147 3 жыл бұрын
Well powershell is default but you can change it in settings which I recommend everyone do cuz powershell low-key ass lmao
@ethimself5064
@ethimself5064 3 жыл бұрын
Reminds me of my first PC back in the day. I refused to buy a computer using only DOS commands, I finally came across a DOS Shell and bingo - sold
@jaden8923
@jaden8923 3 жыл бұрын
Powershell is default
@KeithBoehler
@KeithBoehler 3 жыл бұрын
@@smft9147 The real big brain move is to enable WSL and the use bash/csh/zsh/fish
@xheralt
@xheralt 3 жыл бұрын
The powershell is useless to me because I don't know what do do with it. Command prompt, I know how to work. My first action if PS opens? PS> cmd I don't need to do fancy ass scripting, I just need to execute a non-gui executable, like ffmpeg!
@dimitrioskastis3843
@dimitrioskastis3843 2 жыл бұрын
I like it. It clear a question I had for a long time in a simple language . Thank you.
@HeenaPatel253
@HeenaPatel253 3 жыл бұрын
I had this question for my whole life thanks for making a vid on this
@markusTegelane
@markusTegelane 3 жыл бұрын
I personally use command prompt, because it launches much faster and I am more familiar with it (first OS for me was XP, where there was no Power Shell). Also command prompt DOES support variables within command window using the SET command (e.g. set /a i=4+7), but it only supports 2 data types (strings and integers). And you CAN use nested if statements, but it requires to enable delayed expansion with variables called with !variablename! instead of %variablename% and it is quite messy anyway requiring you to group commands with parenthesis. Example: @echo off setlocal enabledelayedexpansion set /p value=Enter first value: set /p subvalue=Enter second value: if !value! == 42 ( if !subvalue! == 777 ( echo Lucky life ) else ( echo Unlucky life ) ) else ( echo No life ) endlocal exit /b Command prompt also does use some external commands (programs in System32 as you said, e.g. for.exe, ping.exe, etc.).
@unknownaccount4783
@unknownaccount4783 3 жыл бұрын
Else if is possible: if 1==42 ( echo ok ) else if 1==1 ( echo ok )
@Kris_M
@Kris_M 3 жыл бұрын
@Markus that example doesn't need enabledelayedexpansion.
@markusTegelane
@markusTegelane 3 жыл бұрын
@@unknownaccount4783 oh, didn't realize that
@markusTegelane
@markusTegelane 3 жыл бұрын
@@Kris_M yes, but I put it there if anyone wanted to define variables inside the if statement
@markusTegelane
@markusTegelane 3 жыл бұрын
@@abdulelahfallatah Exits from a function/batch file without closing command prompt. Basically if the batch file is run from a command prompt window, it returns to command prompt unlike just "exit"
@numbased
@numbased 3 жыл бұрын
i really like yo house :D
@sheepdev
@sheepdev 3 жыл бұрын
me too :D
@EchoVerse_Sonance
@EchoVerse_Sonance 3 жыл бұрын
Plot twist: it's a random strangers house
@jaden8923
@jaden8923 3 жыл бұрын
Ye
@-_-sneezy
@-_-sneezy 7 ай бұрын
you're really good at explaining. thank you
@jenn8220
@jenn8220 2 жыл бұрын
Super helpful explanation on objects!!! Love the analogy. Thanks for the great video!
@abdullahzayed7866
@abdullahzayed7866 3 жыл бұрын
Awesome sofa you got there
@ThioJoe
@ThioJoe 3 жыл бұрын
It's an ikea
@QkeleQ10
@QkeleQ10 3 жыл бұрын
@@ThioJoe but it's not blue with yellow! Are you sure?
@Kadencabs
@Kadencabs 3 жыл бұрын
@@QkeleQ10 like powershell!!!
@zachh6868
@zachh6868 3 жыл бұрын
I feel real Vsauce with these setups. I like it.
@saivarsha
@saivarsha 3 жыл бұрын
actually learnt powershell for this video. respect
@JimHenderson19
@JimHenderson19 Жыл бұрын
Wow! 13 minutes and you explained all this so well even I understood some of it ...sort of. Thanks!
@vasilis23456
@vasilis23456 3 жыл бұрын
Piping works in cmd too btw. Also you can just type powershell in the command prompt to get it.
@alwinvillero4404
@alwinvillero4404 3 жыл бұрын
how to hack the government: 1. Open cmd 2. color 0a
@gaveferia1421
@gaveferia1421 3 жыл бұрын
you forgot "tree"
@Powercube7
@Powercube7 3 жыл бұрын
Ah yes obamium
@sethadkins546
@sethadkins546 3 жыл бұрын
@@gaveferia1421 dir -a
@gamingislife3332
@gamingislife3332 3 жыл бұрын
Lol
@zfahrel9116
@zfahrel9116 3 жыл бұрын
Open terminal rm rf *
@black_platypus
@black_platypus 5 ай бұрын
Also, to make things more confusing, there is _Windows PowerShell,_ which is no longer updated since version 5.1, and there is what used to be called _PowerShell Core,_ nowadays simply _PowerShell,_ which has received multiple important updates for bug-/security fixes and new/extended features, and is in active development. So you might come across a PS script and wonder "Why isn't this working for me?" -- you might have to install the new, shiny PowerShell instead of the old Windows PowerShell.
@n1c98
@n1c98 2 жыл бұрын
Dude, you are awesome. This was a great video. You explain things really well. Glad you kept it super rudimentary here. Computers are a pretty cool hobby, time to time
@witchilich
@witchilich 3 жыл бұрын
12:06 This is false. You have to put youtube-dl in path and then you can run youtube-dl or any other command line tool. Or you can use a package manager like Scoop to install youtube-dl.
@cladiotto
@cladiotto 3 жыл бұрын
"for some dumb reason" lol
@billkammermeier
@billkammermeier 3 жыл бұрын
command prompt has had pipes since before Windows was even invented. this feature has probably existed since MS-DOS 1.0
@mffmart
@mffmart 3 жыл бұрын
I kinda like the fact that pwsh uses the dot-slash notation to run files in the current directory, and it makes sense from a developing point of view: if Microsoft did not require the dot-slash notation, they would have to test for the existence of the file in the current directory against the list of commands and cmdlets, wasting precious resources and potentially creating a conflict if there was a command or cmdlet with the same name. Also, bash does it this way as well. :)
@Samlol23_drrich
@Samlol23_drrich 3 жыл бұрын
You've come a long way from the kid making spoof how to videos all those years ago. Didnt think you would be able to transition to a real channel, but kudos to you. You did it, and well. Great video
@bspringer
@bspringer 3 жыл бұрын
Where can we get that KZbin DL script?
@XzaroX
@XzaroX 3 жыл бұрын
7:23 CMD also has pipes... And you can use powershell commands in cmd, by invoking powershell, the same way you would a ping.exe or whatever. Also I don't know why people call GOTO commands weird. They are incredibly easy to understand... Like an adventure book of coding. If someone is just starting out I would argue that GOTO is a lot easier to underatand than a bunch of function commands in powershell. Lastly, cmd doesn't have that annoying execution policy enabled by default, so IMO wrapping your powershell scripts into .cmd or .bat is the best way to go lol.
@vladislavkaras491
@vladislavkaras491 2 жыл бұрын
It was pretty informative! The only reason I still prefer the cmd/batch language instead of powershell (excluding backwards compatibility), is loading times (and maybe resource consumtion). If you are using VMs or for whatever reason your PC is lagging, powershell takes ages to load up, while simple cmd starts in seconds. Thanks for the video!
@NoOne-sy5fg
@NoOne-sy5fg 2 жыл бұрын
just switch to a Unix shell and see how much it helps ;)
@vladislavkaras491
@vladislavkaras491 2 жыл бұрын
@@NoOne-sy5fg well, I switch to Linux time to time instead :D
@hassanhijazi4757
@hassanhijazi4757 8 ай бұрын
informative and funny! I like the ambiance here. Thank you!
@trogdorstrngbd
@trogdorstrngbd 3 жыл бұрын
The last line of his PowerShell script calls cmd. XD
@avi12
@avi12 3 жыл бұрын
10:14 Not accurate enough Command Prompt can run .bat and .cmd PowerShell can run .bat , .cmd and .ps1
@Mo-hl8dy
@Mo-hl8dy 3 жыл бұрын
Who remembers when this guy used to make satiric videos like “how do download more Ram”. Used to watch those videos wayyyy back in the day and just stumbled across your channel recently
@doriansego6809
@doriansego6809 2 жыл бұрын
This was an excellent explanation, thank you sir! Subbed!
@JadieI
@JadieI 3 жыл бұрын
Lol I feel so old having my CMD pinned on my task bar.
@Kadencabs
@Kadencabs 3 жыл бұрын
Your not alone
@justsomerandompersononthei2595
@justsomerandompersononthei2595 3 жыл бұрын
Cmd: Basically DOS in Windows NT Powershell: If DOS and BASH had a baby.
@duckmeat4674
@duckmeat4674 3 жыл бұрын
And it came out with an extra chromosome
@prdx8543
@prdx8543 3 жыл бұрын
No... not even bash.. still not at linux level. It's still far away
@michaelcoll433
@michaelcoll433 2 жыл бұрын
That baby would simply be bash and we already have it.
@habibalam8043
@habibalam8043 3 жыл бұрын
Always wondered what the difference between command prompt dark mode and smurf. Thanks to you I never even needed to research lol
@JeffM---
@JeffM--- 2 жыл бұрын
Thank you. I have used Linux Mint on my pc for years, and I have just bought a Win 10 laptop. This makes me feel at home more.
@marna_li
@marna_li 3 жыл бұрын
Technically, PowerShell is a .NET language, like C#, so all "objects" are .NET objects, and you can therefore use .NET objects directly in scripts. And that is also how PowerShell is cross-platform nowadays 🙂
@MrDgwphotos
@MrDgwphotos 5 ай бұрын
You can even write Powershell scripts that could be mistaken for C# if you wanted to.
@konnilol4
@konnilol4 3 жыл бұрын
CMD? - Nah... Power shell? - WHY?! bash? - Yeah... :D
@emeraldishx8755
@emeraldishx8755 3 жыл бұрын
You are the best KZbin advice giver ever
@chromerims
@chromerims 9 ай бұрын
Get-Alias in Powershell is one I'll keep in mind. Thank you 👍
@DestinedByte
@DestinedByte 3 жыл бұрын
since powershell can run on windows and linux the ./ is b/c of the way files are run in linux
@mffmart
@mffmart 3 жыл бұрын
This makes a lot of sense.
@tooru
@tooru 3 жыл бұрын
that still doesn't explain why this is the way you do it
@mffmart
@mffmart 3 жыл бұрын
@@tooru some other comments have reported that it was implemented in BASH as a way to avoid conflicts, and also to prevent accidentally executing files instead of commands, or vice versa. That's why it makes sense. They ported the concept from BASH into PowerShell
@turun_ambartanen
@turun_ambartanen 3 жыл бұрын
It has nothing to do with the way you do it in Lnux, even though the "limitation" is there as well. The real reason is security. Having to type the extra .\\ or ./ is to prevent you from accidentally running malicious files. If you issue a command the computer first checks if there is a file with that name in any directory of the PATH. If it were to check if a program exists in the current directory as well, a malicious person could simply put dri.exe in there and instead of not listing all files because you misstyped the dir command, it would actually run a malicious program. except if you mean the forward slash. That is simply because backslash is plain stupid.
@bazzyi9294
@bazzyi9294 3 жыл бұрын
Ngl he kinda scared me when he popped out from behind the couch
@davido5317
@davido5317 3 жыл бұрын
I saw one of the joke videos about 4 years or so ago, since then I've become big fans of a lot of tech channels, linus, Austin evans....etc Because of that you've been in my recommendations for years but I just never realized that the content had changed to legitimate tips and info. I'm subscribed now but it makes me wonder how many more are like me.
@negai_
@negai_ 2 жыл бұрын
You make me create my own program in powershell by this video
@bitehunter122
@bitehunter122 3 жыл бұрын
MS-DOS - The real performer PowerShell - MS-DOS in drag Cmdlets - drag accessories
@smft9147
@smft9147 3 жыл бұрын
Command prompt > powershell
@ThioJoe
@ThioJoe 3 жыл бұрын
The OG
@jaden8923
@jaden8923 3 жыл бұрын
Ye
@Brahvim
@Brahvim 3 жыл бұрын
@@abdulelahfallatah ? :/
@Brahvim
@Brahvim 3 жыл бұрын
@@abdulelahfallatah oh.. xD!!!
@grjesus9979
@grjesus9979 2 жыл бұрын
Powershell: Offers object oriented type commands (cmdlet) wich helps programmers the task of scripting and data formatting. On the contraire command prompt is basically powershell without cmdlets. Useful commands to start: get-command get-help get-member With this three commands you are good to go and learn Powerhell by yourself
@josef1858
@josef1858 11 ай бұрын
A couple things from a Systems Engineer. You're correct in saying that PowerShell can do everything cmd can do to an extent. There are things that cmd can do that PowerShell can't and vice versa. For example, if you right click on a shortcut and go to properties under "Target" if you need to add a parameter or switch to the exe that's all in cmd syntax. Also automating the installation of MSI files is typically done via CMD syntax. Great video though. Well explained
@NoOne-sy5fg
@NoOne-sy5fg 2 жыл бұрын
meanwhile me using zsh:
@jase_allen
@jase_allen 3 жыл бұрын
Hey, don't knock GoTo! Back in the days before Win95, I wrote a fairly complex (for the day) batch file that loaded on boot to more easily play DOS games so we didn't have to waste memory loading Windows and then the game. I made good use of If, error codes, and GoTo to make that work with all the games we had. Even today, GoTo is very handy to have in VBScript heavy Access Databases. Can't write 3,000 lines of script without throwing in a few GoTos.
@EquaTechnologies
@EquaTechnologies Жыл бұрын
There are even also graphics in powershell. Working buttons can be made, text boxes, font change (in graphics), and much more! Amazing video!
@EquaTechnologies
@EquaTechnologies Жыл бұрын
Some cmd commands don't work on PowerShell like @echo (data) or dir/s as a whole command (dir only not included).
@EquaTechnologies
@EquaTechnologies Жыл бұрын
I mean dir works.
@AndrewRump
@AndrewRump 3 жыл бұрын
You can use pipe and nested if's both in Command shell and Powershell. Powershell works on objects being passed between commandlets as you State while Command shell pipes pass text from one command to the next just like Linux/Unix, i.e. the command need to parse the text. -eq and ./ is the Linux bash(1) way of doing things. Cleaner and safer.
@unknownaccount4783
@unknownaccount4783 3 жыл бұрын
But powershell requires .NET framework => slow startup Microsoft removing CMD soon? Gonna switch fully to yori
@vasopel
@vasopel 3 жыл бұрын
is this true? powershell uses . net? anyway I use cmd,
@kellingc
@kellingc 3 жыл бұрын
The '=' is a part of the regular expression set, thus -eq replaces it as a mathmatical symbol. The .\ means look in the current directory. It is a security feature, as the current directory is not in the path environment variable. I might use it as part of lets say a tar command on ljnux to mean extract to the current directory.
@tigerofficial8176
@tigerofficial8176 3 жыл бұрын
I really need a powershell tutorial from you bro!
@forresthudspeth6791
@forresthudspeth6791 2 жыл бұрын
The ./ execute was enforced in Unix/Linux to prevent bad guys from putting a bogus program in your current working directory that has the same name as the program you intended to use. The ./ is a safe guard so that you declare that you understand you are executing the program in your current working directory, not the program in your default execution path which you may have intended or thought you were going to execute.
@tazguy371
@tazguy371 Жыл бұрын
Same thing in PowerShell 👍
Windows PowerShell vs PowerShell Core - What Is It?
11:19
ThioJoe
Рет қаралды 85 М.
30 Windows Commands you CAN’T live without
14:35
NetworkChuck
Рет қаралды 2,1 МЛН
M3GAN’s ARMY got my finger! 😱🦾 #shorts
00:10
Adam B
Рет қаралды 19 МЛН
BRAWLER MUTATIONS WILL BREAK THE GAME! - Brawl Talk
09:34
Brawl Stars
Рет қаралды 25 МЛН
РАДУЖНАЯ ГОРКА 🌈😱
00:30
ВИОЛА 🐰
Рет қаралды 3,9 МЛН
The Secret Windows "Super Admin" Account
10:49
ThioJoe
Рет қаралды 433 М.
Command Line Crash Course For Beginners | Terminal Commands
44:53
Traversy Media
Рет қаралды 139 М.
BASH scripting will change your life
14:18
NetworkChuck
Рет қаралды 981 М.
15 Command Prompt Secrets and Tricks in Windows
12:46
ThioJoe
Рет қаралды 1,5 МЛН
Disable These 3 Windows Settings Now! (For Security)
12:26
ThioJoe
Рет қаралды 458 М.
CMD - Command Prompt Training for IT Professionals (Full Course)
3:18:32
Jobskillshare Community
Рет қаралды 1 МЛН
Bash vs Powershell vs CMD: The Software Drag Racing Series E03
18:23
5 Tips to Help You Learn Windows PowerShell
18:34
Gary Explains
Рет қаралды 38 М.
17 Computer Tips You'll WISH You Knew Sooner
21:07
ThioJoe
Рет қаралды 177 М.
Распаковка айфона в воде😱 #shorts
0:25
НЭКС
Рет қаралды 1 МЛН
Which Phone Unlock Code Will You Choose? 🤔️
0:12
Game9bit
Рет қаралды 4,8 МЛН
phone charge game #viral #tranding #new #reels
0:18
YODHA GAMING RAAS
Рет қаралды 5 МЛН
Почему сканер ставят так не удобно?
0:47
Не шарю!
Рет қаралды 212 М.
Alat Pengisi Batre Tapi Endingnya Malah Begini
0:14
Gian Dwi Saputro
Рет қаралды 10 МЛН