You can use Windows PowerShell to write and run scripts that help you manage computers from a command line. This wikiHow will show you how to create scripts using Windows PowerShell on your PC.

Steps

  1. 1
    Open Windows PowerShell ISE as an administrator. Here's how you can open the app:
    • Press Win+S to open the search bar.
    • Type powershell ise into the search bar.
    • Right-click Windows PowerShell ISE in the results.
    • Click Run as administrator.
    • Most modern Windows PCs come with PowerShell installed. If you don't have the program, you can get it with the Management Framework 5.1 package at https://www.microsoft.com/en-us/download/details.aspx?id=54616.
  2. 2
    Click the File menu. You'll see this in the top left corner of the program and a menu will drop-down.
    Advertisement
  3. 3
    Click New on the menu. You can also click the paper and asterisk icon to start a new script.
  4. 4
    Click the cursor in the script pane. When you click in the Script Pane, typing is enabled.[1]
  5. 5
    Write your script. If you're new to scripting, check out this link to learn more. You can also search the web for script ideas and examples.
    • For example, type Write-Host "Hello world".
  6. 6
    Click the File menu. You'll see this in the top left corner of the program and a menu will drop-down.
  7. 7
    Click Save on the menu. Your file browser will open so you can rename and save your file. It will save as a .ps1 file.[2]
  8. Advertisement

About This Article

Darlene Antonelli, MA
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Darlene Antonelli, MA. Darlene Antonelli is a Technology Writer and Editor for wikiHow. Darlene has experience teaching college courses, writing technology-related articles, and working hands-on in the technology field. She earned an MA in Writing from Rowan University in 2012 and wrote her thesis on online communities and the personalities curated in such communities. This article has been viewed 9,602 times.
How helpful is this?
Co-authors: 2
Updated: January 6, 2020
Views: 9,602
Categories: Windows
Article SummaryX

1. Open PowerShell and make sure you choose "Run as administrator."
2. Click the File tab.
3. Click New.
4. Click the cursor in the script pane.
5. Write your script.
6. Click the File tab.
7. Click Save.

Did this summary help you?
Advertisement