Download PowerShell - Microsoft's New Command ShellGet your copy of PowerShellOne of my themes with Windows PowerShell is that nothing is too simple. Therefore, let me start by checking that you have downloaded and installed the correct PowerShell files. If indeed, you have PowerShell installed and functioning correctly then go to my 'Execute Commands' page. PowerShell DownloadsIt breaks my heart to send you away from my site, but it is essential that you get a copy of PowerShell and .NET Framework from Microsoft's own site. PowerShell itself
Download PowerShell from Microsoft's site .NET Framework Microsoft .NET Framework 2.0 Redistributable Package (x86) Microsoft .NET Framework 3.0 Redistributable Package PowerShell InstallationHere are the three stages before you get up and running with PowerShell:
Once you have installed PowerShell (and .Net), try this simple command: Here opposite is a screen shot of what you should see: Version 1.x.x.x As usual, there are two ways of doing
everything, you could try.
˚
The Situation with PowerShell and the Operating SystemPrevious scripting programs came 'built-in' to the operating system. DOS has its cmd.exe, while VBScript has cscript.exe as its scripting engine. As of 2007, no commercial operating system, not even Vista, has PowerShell 'built-in'. Fortunately, installation is one of Microsoft's strengths, thus obtaining both PowerShell and .Net Framework is an uncomplicated one-off task. PowerShell Runs on these systems: Windows Server 2003, Windows XP and even Windows Vista, however each has their own version of PowerShell. Getting Started - PowerShell's StructureThe basic PowerShell command consists of a two-word sentence. Start with a verb follow with a dash and end with a noun. Naturally, you press carriage return when you have finished the command. get-Process (Correct). get - process (Wrong. The dash needs no space). With time and practice, you will soon increase your
vocabulary. Experiment with nouns such as Eventlog. For example: From this example we learn that the dash or minus sign has another role, namely as a modifier or switch, thus the role of a space, or a lack of a space, becomes more obvious, for example -list tells the command to display all the event logs. Perhaps the most useful command for beginners is: get-help followed by the command. For example: get-help process Alternatively, you could try plain: help. From this we deduce that the default verb is 'get'. Test this theory by typing just a noun that PowerShell understands: Process See Also• Windows PowerShell Home • Introduction • Cmdlets • Exchange 2007 • Profile.ps1 • $_.Pipeline If you see an error of any kind, do let me know. Please report any factual mistakes, grammatical errors or broken links, I will be happy to not only to correct the fault, but also to give you credit. *
|
|||||