PowerShell isn't scary—these everyday commands prove it
Windows users like to give Linux enthusiasts heat because they love the Terminal so much, but the truth is that even for some everyday tasks it's often better to use a command line interface instead of clicking a bunch of pictures.
On Windows, the optimal way to do this these days is by using PowerShell, which can be daunting, but if you just start off with a few useful commands under the belt, you'll soon find yourself reaching for the command line instead of your mouse. Incidentally, PowerShell has a neat Quake-like shortcut , which lets you summon it instantly with your keyboard. Making it even more useful when combined with one of these handy commands.
Navigate your system faster than File Explorer
Faster than a speeding mouse pointer
Most people just use the WIndows File Explorer to navigate the file system of their computers, but in many cases it can be faster to just type where you want to go. Especially given how utterly useless the Start Menu search function is these days.
The first command worth knowing is Get-Locationwhich will show you where you currently are in the file structure so you don't get lost.
You'll also want Set-Locationas in Set-Location Downloadswhich instantly moves you to your Downloads folder.
Then use Get-ChildItemto see everything in the folder.
Now you know enough to see where you are and set where you're going. That's progress!
Copy, move, and delete files in seconds
Those who can, do.
It's not enough to just look at your files. Surely you want to do, well, stuff to those files. If you want to copy, move, or delete a file in your current location, use these commands.
-
Copy-Item file.txt D:\\Backup
-
Move-Item report.docx D:\\Work
-
Remove-Item oldfile.zip
Obviously, with the copy and move commands, the second part is the destination.
Find files instantly (even buried ones)
Because Windows Search has failed us
Yes, Windows search used to be good, but now it can't find anything on your computer and does internet searches for apps you've already installed. By the way, there's a much better search tool that comes as part of PowerToys . You should check it out.
But, finding files using PowerShell is not only effective, it comes with lots of hacker street cred too, and all you have to do is type Get-ChildItem -Recurse -Filter *.jpgto, for example, find all the JPEG files in your current location.
Covering all the file search parameters and methods is out of scope here, but you can check the Microsoft Developers Bio for a really nice overview of how to find exactly what you're looking for almost instantly.
Open apps and settings without digging through menus
Is this even a real command?
This doesn't even need much explanation. If you want to launch an app using PowerShell, all you have to do is type its name. If you type notepadthen Notepad will open, for example.
Of course, the downside here is that you need to know the executable name, but at least you only have to look that up once!
Check system info and fix problem apps quickly
So this is what it means to be a "power" user...
It's all been fun and games so far, but what about using PowerShell for something a little more mission-critical? First, you'll want to learn Get-ComputerInfowhich pulls together a big stack if important information about your computer or any Windows computer you encounter that has PowerShell on it. It's a good first stop to see what you're working with.
What version of Windows are you running? When was the BIOS last updated ? All the answers are right there.
Get-Processand Stop-Process -Name [name or ID of your app]are also a useful combo, because it shows you what processes are running and then gives you a way to terminate a process from PowerShell. A real lifesaver for when you can't use Task Manager!
PowerShell isn't scary at all
You don't have to know every PowerShell command to use it. I certainly don't! Like anything, you should focus on the commands that you actually need and, over time, your vocabulary will grow!
