Cmd Powershell Converter
Fast, accurate and free online cmd powershell converter tool running directly in your browser.
-
1Enter data
Enter content, paste text or load a file from disk. -
2Click the button
The tool will immediately process your data in the browser. -
3Get the result
Copy the finished text or save the file to your device.
return "Result ready in 0.1s";
}
Rate this tool:
Related tools
Other tools you may find usefulCMD to PowerShell converter - table of Windows command equivalents
PowerShell is a modern Windows shell replacing CMD (Command Prompt). Most CMD commands work in PowerShell via aliases, but the syntax differs in advanced cases. The tool translates CMD commands into native PowerShell cmdlets with explanation.
Basic CMD equivalents → PowerShell
dir → Get-ChildItem (alias: dir, ls, gci). cd → Set-Location (alias: cd, sl). copy → Copy-Item (alias: copy, cp). move → Move-Item (aka: move, mv). del/erase → Remove-Item (aka: del, rm, ri). rename → Rename-Item (alias: ren). mkdir → New-Item -ItemType Directory (alias: mkdir, md). type → Get-Content (alias: type, cat, gc). cls → Clear-Host (alias: cls, clear).
Network Commands CMD → PowerShell
ipconfig → Get-NetIPConfiguration (or ipconfig still works). ping → Test-Connection. tracert → Test-NetConnection -TraceRoute. netstat → Get-NetTCPConnection. nslookup → Resolve-DnsName. net use → New-PSDrive or net use (old one works). arp -a → Get-NetNeighbor. hostname → $env:COMPUTERNAME.
Process and service management
tasklist → Get-Process (alias: ps). taskkill /PID 1234 → Stop-Process -Id 1234. net start/stop service → Start-Service/Stop-Service. sc query → Get-Service. regedit → regedit still or New-ItemProperty (registry). msconfig → no cmdlet, GUI. shutdown /r /t 0 → Restart-Computer. systeminfo → Get-ComputerInfo.
Why migrate from CMD to PowerShell
Object-oriented output: cmdlet results are objects (not text) - easier filtering. Pipeline: Get-Process | Where-Object CPU -gt 10 | Sort-Object CPU -Desc. .ps1 scripts: advanced automations. Modules: Active Directory, Azure, VMware, SQL Server. Remoting: Enter-PSSession (SSH-like). Cross-platform: PowerShell Core (Linux, macOS).
FAQ
How to run CMD as administrator in PowerShell?
CMD: right click on the icon → "Run as administrator". PowerShell: Start-Process cmd.exe -Verb RunAs. Automatically in the script: [Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent() checks permissions. For PS itself: Start-Process powershell -Verb RunAs.
How to convert .bat script to PowerShell?
Manual: replace CMD commands with PS equivalents. Variables: %VAR% → $env:VAR or $VAR. IF exists: IF EXIST path → Test-Path. FOR loop: FOR /F → ForEach-Object or foreach. GOTO: PowerShell doesn't have goto - use functions. Comments: REM → #. echo. (newline) → Write-Host "".
Do CMD aliases work in PowerShell?
Most yes: dir, cd, del, copy, move, cls, type, echo, ipconfig, ping, tracert. PS aliases: ls = dir = Get-ChildItem; rm = del = Remove-Item. Note: some aliases have different behavior. dir in PS returns FileSystemInfo objects, not plain text. Parameters: dir /s /b → Get-ChildItem -Recurse -Name.
How to use environment variables in PowerShell?
$env:PATH – PATH variable. $env:COMPUTERNAME – computer name. $env:USERNAME – current user. $env:TEMP – temporary directory. Create: $env:MYVAR = "value". Persistent (system): [System.Environment]::SetEnvironmentVariable("VAR", "val", "Machine"). In CMD: %VAR%, in PS: $env:VAR.
What is the difference between PowerShell and PowerShell Core?
Windows PowerShell (5.1): Windows only, .NET Framework, included with Windows. PowerShell Core (6+) / PowerShell 7+: cross-platform (Windows/Linux/macOS), .NET Core/.NET 5+, open source (GitHub). Aliases: On PS7, some Linux aliases (ls, cat) are available by default. Microsoft recommends PS7 for new projects.
Related tools: bash command generator, PowerShell script tester and code converter.