Power shell Study Notes

Source: Internet
Author: User

How do you build the system environment when you get a brand new computer? Do I manually create a user group and manually configure permissions for each service? At least, you should learn how to write the next batch of processing commands. You will save a lot of configuration time. Of course, batch processing is not omnipotent. Sometimes some problems may be difficult to convert to batch processing, but with the appearance of Power shell, this situation has completely changed. We believe that power shell will become a required skill for all implementers in the future. Let's take a brief look at power shell.

Windows powershell design goals

Windows powershell is a new Windows Command Line shell program designed for system administrators. The shell contains an interactive prompt and a script environment, which can be used independently or in combination.

Unlike most Shell programs that accept and return text, Windows powershell is in. net public Language Runtime (CLR) and. net Framework, which accepts and returns.. Net object. This fundamental change in the environment brings new tools and methods for managing and configuring Windows.

Windows powershell introduces the concept of cmdlet (read as "command-Let"), which is a simple single function command line tool built into the shell program. Each cmdlet can be used separately, but it works only when these simple tools are combined to execute complex tasks. Windows powershell includes more than one hundred basic core cmdlets. You can write your own cmdlets and share them with other users.

Like many Shell programs, Windows powershell provides you with access to file systems on your computer. In addition, Windows powershell provides access to other data storage areas, such as the registry and digital signature certificate storage areas, which are as easy as accessing the file system.

Windows powershell Introduction

Most Shell programs, including cmd.exe and SH, KSh, CSH, and bash UNIX shells, run commands or utilities in the new process, the result is displayed in text. After several years of development, many text processing utilities (such as SED, awk, and Perl) have now developed to support this interaction.

These Shell programs also have commands that are built into the shell program and run in the shell program process, such as the typeset command in ksh and the Dir command in cmd.exe. In most Shell programs, many utilities are created because of the few built-in commands.

Windows powershell is quite different.

· Windows powershell does not process text. Instead, it processes Objects Based on the. NET platform.

· Windows powershell comes with a large number of built-in commands with consistent interfaces.

· All shell program commands use the same command analysis program, instead of using different analysis programs for each tool. In this way, you can learn how to use each command more easily.

The best advantage is that you don't have to give up on your tools. You can still use traditional Windows tools such as net, SC, and reg.exe in Windows powershell.

Windows powershellSummary

Power shell is like an extended version of the batch processing program. It solves the defect that batch processing can only call compiled EXE programs. Provides the function of directly calling. Net objects. In the past, we needed to write EXE to implement functions that can be converted to pure PS script implementation. It is very close to shell programming in Linux and UNIX. Of course, at present, power shell only supports Windows server operating systems (which is not required for personal computers) and supports. net. This course is based on Windows Server 2008r2's power shell 2.0.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.