What is Windows PowerShell?
Windows PowerShell is a tool for automated object-oriented (object-oriented scripting language oriented) and a shell command line interaction design expert to help IT system configure and automate task management. Treatment. Windows PowerShell comes out of the Windows 2008R2 version of all modern Windows operating systems.
Unlike most shells, only accept and return text, PowerShell is built on the Windows platform environment common language.NET framework (CLR) and.NET framework to accept and return object.NET framework. This change brings about the basic tools and methods in completely new management and configuration of Windows.
Understanding Windows PowerShell is like learning how to use a tool, general Cantonese. Some basic script PowerShell will help you easily perform almost any task management related environment. Ng Windows it.
PowerShell provides all options and command line scripting integration environment (Ise):
Start the command line to enter PowerShell, powershell.exe in the start menu of Windows. You will see a screen as follows:
Start input PowerShell Ise, PowerShell ise.exe in the start menu. Using PowerShell, Ise usually prefers working scripting languages, and automatically populate commands to automate these functions, which may simplify work development and test scripts.
PowerShell ready to run the script
PowerShell scripts are stored in a file.Ps1. You can’t run a script when the mouse is in a dual boot file, allowing you to avoid hurting the wishes of the system. Instead, a friend executes scripts in the script, right mouse click to select “shake with PowerShell”.
In addition, there are policy enforcement orders. You can check the policy by using the command line: get it in PowerShell – execution policy
You get a value:
Restrict: scripts are not allowed. This is the default setting, so you will see their first run command.
Allsigned: you can run your script by a reputable flag, API and install such a command before executing the script. You need to confirm if you want to run the command.
Remotesigned: you can run your own script or script API logo or good reputation.
Unrestricted: you can run whatever script you want.
PowerShell starts working, you need to change the policy restrictions set from the disk execution policy remotesigned remotesigned with the command:
About cmdlets – short command
The operators of cmdlet PowerShell command and function definition are in the same programming language. Here are some important cmdlet commands to note:
Cmdlets system, user cmdlets, cmdlets customization.
The output of your cmdlets is a sequence of objects or objects.
– cmdlets can get analytical data or move data to another cmdlet pipe.
– cmdlets do not distinguish between uppercase and lowercase. For example, you enter “let abuser”, “let abuser” or “let abuser” have no effect.
If you want to use some cmdlets analysis in a string, you need to use semicolons (()).
A cmdlet of a structure always includes a verb (or from a function as a verb and a noun). For example, the commands that include verbs are as follows:
Get orders to call.
Set command confirmation
– start the command.
Stop – stop running
The order is coming.
Create new commands
You can perform some cmdlets after:
Let process display the current process running on your computer.
Let your content display the specified file content (for example: let contents windowssystem32driversetchosts).
You may be cmdlets.
If not a friend