O'Reilly logo

Learn PowerShell Toolmaking in a Month of Lunches by Don Jones and Jeffrey Hicks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4.2. Turn the command into a script

For the next step, we’re going to turn to the PowerShell ISE. We’ll copy our command to the clipboard (if you started in the PowerShell console, highlight the command and press Enter to copy it) and then paste the command into the ISE. As you can see in figure 4.1, our copy-and-paste operation included some of the PowerShell prompt, as well as an unnecessary carriage return. We’ll need to edit those out before running the command again.

Figure 4.1. Pasting the command into the ISE

Figure 4.2 shows the edited script, which includes the complete command on a single line. We’ll run this by clicking the green ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required