DEV Community

Frank A
Frank A

Posted on

PowerShell

Are you still clicking through Windows menu's? Do they require PowerShell for jobs but you've never touched it?

PowerShell let's you interact with Windows systems through a terminal. It supports many commands, like Get-Location, Set-Location and many others.

Some common commands:

Command What it does
Get-Process List running processes
Get-Service List services and status
Get-ChildItem List files/folders
Select-Object Pick specific fields
Where-Object Filter output

It's efficient and can save you a lot of time. PowerShell supports scripting too, so repeated tasks you can with one key. If you get PowerShell scripts or commands, you may want to know what they are doing before running them on your computer. One way to practice PowerShell is using ShellReps.

PowerShell 7 (current) runs on Windows, macOS, and Linux (Ubuntu, Debian, CentOS, RHEL, Fedora, Alpine, and more via .NET). Though for Linux you may as well use Bash scripting instead, unless you want portability between your scripts.

You may wonder what about AI? AI increases the need to know PowerShell, as otherwise the AI runs commands directly on your system and it's a massive security risk. You'd want to double check the commands in the script, to avoid prompt injection or malicious actors from infecting your system. And in a job interview, you probably won't get away with "wait, let me ask Claude"

Top comments (0)