- At the script pane, type in the following:
PS> Write-Host "Hello, World!"
- Save the script (File > Save or Ctrl + S).
- Click on Debug on the left. Alternatively, press Ctrl + Shift + D. This opens the Debug pane.
- Press the green Start debugging button. The console should pop out and display Hello, World!.
- Let us run the script one more time. This time, we will not open the Debug pane or press buttons on the screen. Simply, press F5.
Hello, World! should again be displayed in the console:
Let us now call the script without using the debug controls:
- Close the file (Ctrl + W).
- At the prompt on the console, type in the following: ...