🧠 If you ever opened a black window with incomprehensible inscriptions and closed it with the words "oh, better not to touch" — congratulations, it was PowerShell. Today you will learn how to use it wisely and without fear. It will be simple, fun and with memes. Let's go!
What is PowerShell and why do you need it?

PowerShell is a powerful tool from Microsoft for automating tasks and managing the system. Imagine that it's like Google Docs, only for a programmer: everything is under control, everything is automated.
🤔 Why not just Explorer?
Explorer (regular folder window) | PowerShell |
|---|---|
Click with the mouse | You write commands ✍️ |
You are slowly renaming 100 files | You do it with one line of code |
You break down when something doesn't work | Fix it through the script |
PowerShell can be especially useful if you:
Working with a large number of files
You often perform the same actions (for example, copying/archiving)
Do you want to set up the system once and forget about the routine forever?
👀 PowerShell is like a superpower for your computer. Only instead of the web, there are commands.
How to open PowerShell 🔓
Click
Win + RWrite
powershellPress Enter
And you're in business! (Yes, it's that simple. Don't be afraid!)
And if you want to run PowerShell as an administrator:
Find PowerShell through Windows search
Right-click and select "Run as administrator"
🧙♂️ Admin mode opens up even more possibilities (for example, managing services and program settings).
First command: Get-Help
Get-HelpThis command is your new best friend. It will tell you what any other command does.
Get-Help Get-ProcessIf you want to see examples of use:
Get-Help Get-Process -Examples🧑🏫 Joke of the day: PowerShell is like Stack Overflow, only you help yourself.
Useful commands for a beginner 🛠️
Team | What it does |
| Shows running processes |
| Completes the process (for example, closes Chrome) |
| Shows services in the system |
| Starts or stops services |
| Shows files and folders in the current directory |
| Go to another folder (analogous to cd) |
| Create a file or folder |
| Deleting a file or folder |
| Copying files and folders |
| Moving files and folders |
Examples: how to make magic ✨
View all files in the folder:
Get-ChildItem C:\Users\PublicGo to folder:
Set-Location C:\Users\PublicCreate a text file:
New-Item -Path . -Name "example.txt" -ItemType "File"Delete file:
Remove-Item .\example.txtRename file:
Rename-Item -Path "old.txt" -NewName "new.txt"Copy file:
Copy-Item -Path "example.txt" -Destination "backup_example.txt"Move file:
Move-Item -Path "backup_example.txt" -Destination "C:\Backup"🤓 Pssst... So you can even automate cleaning on your desktop.
How to write a script 💻
PowerShell scripts are just files with the extension .ps1. You can open Notepad, write commands, save as script.ps1, and then run it.
# Example: a script that creates 3 folders
New-Item -Path . -Name "Project1" -ItemType "Directory"
New-Item -Path . -Name "Project2" -ItemType "Directory"
New-Item -Path . -Name "Project3" -ItemType "Directory"To start:
.\script.ps1💡 To make the scripts work, sometimes you need to change the execution policy:
Set-ExecutionPolicy RemoteSignedSelect Y (Yes) and Enter — you're done!
🙈 Joke of the day: PowerShell scripts are like pasta: if you do it right, it tastes good. If not, everything will stick together.
How to automate daily tasks 🤖
Here are some ideas of what you can automate with PowerShell:
🔄 File backup
Copy-Item "C:\Work\*" "D:\Backup\" -Recurse📅 Creating a daily log
$today = Get-Date -Format "yyyy-MM-dd"
New-Item -Path . -Name "log_$today.txt" -ItemType "File"🧹 Cleaning the "Downloads" folder from old files:
Get-ChildItem "C:\Users\User\Downloads" | Where-Object { $_.LastWriteTime -lt (Get-Date).AddDays(-30) } | Remove-Item🧼 Automatic cleaning is now a reality!
What's next?
If you like PowerShell (and you will!), then here's where to go next:
Learn to write more complex scripts
Manage remote computers
Automate daily tasks (backups, reports, etc.)
Use PowerShell with Windows Task Scheduler
Work with JSON, CSV, and Excel files through PowerShell
And if you want to learn not only PowerShell, but also other programming languages, try Code! This is a convenient and fun application for learning Python, JavaScript and other languages even from scratch 🧑💻📱
