In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
When it comes to "Shell", it's easy to associate with scripts, programming languages, and so on, which is why many ITPro don't delve into PowerShell. Many ITPro people think that using PowerShell well involves complex functions, variables, and scripts, which may be a misunderstanding. In fact, PowerShell is originally designed as an advanced management tool for system administrators to use. Therefore, running commands to achieve the purpose of managing the system is the beginning of our study of PowerShell.
What is Cmdlet
Cmdlet is a native PowerShell command-line tool, although it looks similar to ordinary Dos command-line tools, it is essentially different. Cmdlet is much more complex than pure Dos command-line commands. You can execute Dos command-line commands in the console window of PowerShell, and vice versa.
The screenshot above is the result of executing the "get-command" command in the PowerShell console and Dos console, respectively. As you can see, the left window has feedback on the results, while the Dos window on the right cannot find the command information. What happens if we try to execute a Dos command?
II. Naming convention of Cmdlet
There are no rules, and so is PowerShell's Cmdlet. All Cmdlet commands are made up of "verb"-"+" noun (singular), such as: get (verb)-(dash) command (noun). You can view the list of allowed verbs by running Get-Verb.
PowerShell allows custom nouns, so there is no Cmdlet for Get-Noun to display all nouns. It should be noted that not all verb positions are verbs, such as New and Where. These words are nouns with verb nature (if you don't understand, please make up the English course).
The biggest advantage of this naming convention is that commands can be guessed in advance and then verified with the help system or Get-Command commands.
III. Aliases
Although we have mastered the naming convention of PowerShell, we will find that some commands are so long that they are still too long to make up with commands, which is why aliases are needed. To know if a Cmdlet command has an alias, execute the following command: Get-Alias-Definition "Get-Service"
You can see from the image above that Gsv is an alias for Get-Service. You can also use the New-Alias command to create a custom alias, but if you don't export it, its life cycle is limited to this session.
IV. Some terms
[Cmdlet]: a native PowerShell command-line tool that exists only in PowerShell and. Net Framework languages like C#. Pronunciation: command-let.
[function (Function)]: like Cmdlet, it is written in PowerShell's own scripting language.
[workflow (workflow)]: is a kind of special function of workflow execution system embedded in PowerShell.
[application]: any type of external executable program, including command-line tools such as Ping, ipconfig, etc.
[command]: is a generic term that represents any or all of the terms mentioned above.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.