BRONZE PARTNER:
BRONZE PARTNER:
Industry News:

| |
| |
 |
 |
 |
 |
 |
| The PowerShell Copy And Paste Method |
 |
|
|
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.
|
 |
 |
 |
|
|