PowerShell Windows 7 Tutorial
PowerShell is a scripting language provided by Microsoft for the Windows operating system. You can use PowerShell in either an interactive or batch mode. Use the interactive mode for one time tasks and the batch mode for repetitive tasks across one or more computers. PowerShell contains many different commands, referred to as cmdlets, to work with files, folders and operating system components. Hone your PowerShell skills to conquer your next tough administration task.
Instructions
-
-
1
Click on the "Start" icon located on the Windows task bar, select "Accessories," "Windows PowerShell" and "PowerShell."
-
2
Type "get-help *" and press "Enter" to display a list of the available commands in PowerShell.
-
-
3
Type "Get-date" and press "Enter" to execute the cmdlet used for retrieving the system time and date information. This is an example of using an interactive command in PowerShell.
-
4
Click on the "Start" icon located on the Windows task bar, select "Accessories" and "Notepad."
-
5
Type "Get-date" in the Notepad application and save the file as "C:\test.ps1". Exit the Notepad application and return to the PowerShell window.
-
6
Type the command "Set-ExecutionPolicy Unrestricted" and press "Enter" at the PowerShell command prompt to allow execution of a file in batch mode.
-
7
Type "C:\test.ps1" at the command prompt to execute the file, displaying the time and date information.
-
8
Type "Exit" at the command prompt to close the PowerShell console window.
-
1
References
- Photo Credit Thinkstock Images/Comstock/Getty Images