Powerful Windows PowerShell and windowspowershell
PowerShell is a very powerful Shell, MacOS has AppleScript, Windows is the entire PowerShell, so let's not talk about it much, write a few simple examples
Enter PowerShell in the command line to come out with a command window, but there is no windows in the XP system, which is available in Wiin7, Win8, and.
1. Computing
Enter 10 + 20 and press enter to see the result 30.
Input kb and MB can be identified.
2. Variables
All variable names are preceded by the $ sign, which is similar to php
Input
$ A = 10
$ B = 20
$ A + $ B
Enter 30
3. Run other commands
Ipconfig, dir, netstat-ano, and other cmd commands can also run and output the results.
4. Run the PowerShell script
Create a txt file and use the record to open it. Then you can write the PowerShell script, which can also be called. net commands, such as SHA256 and Encoding.
After writing the script, change the suffix to. ps1, and then enter the path in the PowerShell command line to execute the script.
By default, the script execution function is disabled. You can run Set-ExecutionPolicy UnRestricted as an administrator and enter yes. Otherwise, an error may occur when executing the script.
There are also a lot of tutorials on how to set parameters for PowerShell.
Http://www.pstips.net/powershell-online-tutorials
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.