PowerShell
PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and the associated scripting language.

Perintah Umum

Cek versi WSL distro Linux yang terinstall

1
wsl -l -v
Copied!

Ubah versi ke WSL 2 distro Linux yang terinstall

1
wsl --set-version <NAME> 2
Copied!

Run As Administrator

1
Start-Process Powershell -Verb runAs
Copied!

Update PowerShell

Jalankan PowerShell sebagai Administrator dulu.
1
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
Copied!

Empty Recycle Bin

1
Clear-RecycleBin -Force
Copied!

New File

1
New-Item Test_File.txt -ItemType File
Copied!
1
New-Item -Path 'D:\temp\Test Folder\Test File.txt' -ItemType File
Copied!