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

wsl -l -v

Ubah versi ke WSL 2 distro Linux yang terinstall

wsl --set-version <NAME> 2

Run As Administrator

Start-Process Powershell -Verb runAs

Update PowerShell

Jalankan PowerShell sebagai Administrator dulu.

iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"

Empty Recycle Bin

Clear-RecycleBin -Force

New File

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