A common task performed when learning a new language is how to display “Hello World!”. Creating such an application with PowerShell is simple. Type the following into a shell (you can omit lines starting with #. Everything after # is a comment) and press Enter:
PowerShell scripts can also be saved to a file and executed. Save this Hello World sample to HelloWorld.ps1. Use the standard command-line cd
command to navigate to folder in which HelloWorld.ps1 is saved. To execute the script, type the following to the shell:
.HelloWorld.ps1