Grab our RSS feeds Follow us on Twitter Join our Facebook Group Connect with us on LinkedIn
myITforum.com, Powered by You.
you are not logged in

Articles

Newslinks

Links

Downloads

Site Services

Community Forums

Discussion Lists

Article Search

Newsletter

Web Blogs

FAQs

Live Support

myITforum TV

Take a Poll

Monthly Drawing

myITforum Network

User Group Directory

Our Partners

About Us

Register

Login

BRONZE PARTNER:

BRONZE PARTNER:



Industry News:




  Home : Articles : SMS 2.x print | email | | Forums |   print | email | | Blogs |   print | email | | Wiki |   print | email | | FAQs |   print | email | Article Search  
The PowerShell Copy And Paste Method


Bookmark and Share

By: Don Hite
Posted On: 11/5/2007

This article was Previously posted on Don Hite's Blog

When you are surfing the internet and find a PowerShell script that you want to test or eventually save there are several ways to do so. You can copy the contents of the script and save it as a .Ps1 script in notepad or if available download it from the author’s page.

The simplest way to test small PowerShell scripts you find is to use the old copy and paste method as outlined below.

1. First copy and paste the contents of the PowerShell script to place it in your clipboard buffer.

2. Then from the PowerShell console right mouse click on the PowerShell icon in the upper left hand corner.

3. From the context menu click “Edit” and then click “Paste” to execute the script.

Example:

Cat C:\Windows\System32\WindowsPowershell\v1.0\Examples\Profile.ps1

Note: Depending on the script in your clipboard buffer you may have to press “Enter” to execute the script as in the example above.


  myITforum.com ©2010 | Legal | Privacy