Write Script File in Windows PowerShell
How to write a script file in Windows PowerShell to run multiple commands together?
Writting a script file in Windows PowerShell is easy. You can follow these steps:
1. Open Notepad.
2. Write commands in Notepad with one command per line. For example:
Write-Host "Hello World!" test-connection www.microsoft.com -count 1 | format-list Address,ResponseTime
3. Save the script to a file called Hello.ps1.
4. Open a Windows PowerShell window.
5. Type in ".\Hello.ps1" at the command prompt. You will see two commands from the script file get executed:
PS C:\fyicenter> .\Hello.ps1 Hello World! Address : www.microsoft.com ResponseTime : 30
If you are getting errors, see the next tutorial on how to fix it.
2016-11-03, 1775👍, 0💬
Can I remove startup application "RealPlay.exe - RealPlayer Tray Bar Application" to speedup my comp...
Can I disable Windows service "usnsvc.exe: Messenger Sharing USN Journal Reader Service" to speedup ...
What files are used by Alexa Toolbar for Internet Explorer (IE) 7 browser? How Alexa Toolbar is conf...
How to configure your system for DSL Internet connection? Once your DSL modem is connected to your s...
How to configure Mozilla FireFox to use Notepad to edit Web page source code? By default, when you u...