Online PowerShell Compiler
Run PowerShell scripts online with PowerShell 7.6 on .NET 10. Write a script, press Run, and see its output beside your code, with errors shown with the line that raised them. Scripts can read input with Read-Host as they run, and the cmdlets that come with PowerShell are ready to use.
How to run PowerShell code online
- This page opens with PowerShell selected, so you can start typing straight away.
- Write your code in the editor, or open files from your computer: single files, or a whole project as a .zip.
- Press Run, or Ctrl+Enter. The output appears in the panel beside the editor, and when the program asks for input you type it there and press Enter.
- Share a copy with a link, or save your files to your computer.
PowerShell 7.6 on Online IDE
- Your script runs with PowerShell 7.6 on .NET 10 for Linux, and its command-line arguments arrive in $args.
- Read-Host reads a line of input and shows its prompt first, so Read-Host 'Your name' prints "Your name: " and waits.
- Write-Output sends text to the output panel, and an error shows the line that raised it.
- The modules that come with PowerShell, such as Microsoft.PowerShell.Utility and ThreadJob, work, but modules from the PowerShell Gallery cannot be installed.
Example: a PowerShell program that reads input
$line = Read-Host 'Enter a whole number'
$n = 0
if ([int]::TryParse($line, [ref]$n) -and $n -gt 0) {
$divisors = 1..$n | Where-Object { $n % $_ -eq 0 }
Write-Output "Divisors of ${n}: $($divisors -join ', ')"
} else {
Write-Output 'Please enter a whole number above zero.'
}
Features of this tool
- Simple and fastA clean, lightweight editor that opens instantly.
- Powered by AceThe Ace code editor, with syntax highlighting, autocompletion and bracket matching.
- Interactive programsType input into the terminal while your program runs.
- Several filesWork in tabs, open files or a .zip from your computer, and save the project back to disk.
- Made for learningHelpful for beginners to learn and practice programs.
- Light and dark themesPlus 39 editor themes, a choice of coding fonts, and Vim, Emacs or VS Code keys.
- Keep your outputCopy or download the program output in one click.
- Share by linkSave your code in the cloud and open it anywhere.
Frequently asked questions
Which PowerShell version does Online IDE run?
PowerShell 7.6 on .NET 10, on Linux. Windows PowerShell 5.1 and Windows-only cmdlets, such as those for WMI or the event log, are not available.
Can a PowerShell script read input?
Yes. Use Read-Host, then type into the output panel while the script waits and press Enter.
Can I install modules with Install-Module?
No. Scripts run without network access, so the PowerShell Gallery cannot be reached. The modules that come with PowerShell work.
What exit code does my script return?
The one you give to exit, such as exit 3, or 1 when an error stops the script. Otherwise it is that of the last program the script ran, or 0.
Contact us
For any feedback, queries or issues, please feel free to contact us or write to . We value your input and are committed to providing the best possible experience for our users.