PowerShell Learning Notes-Object (i)

Source: Internet
Author: User
For my it Pro, PowerShell is really not easy to learn. No matter what it looks like in the future, it is now really a scripting language , a language ! I listen to functions, variables, objects, the headache of the people, today for the moment to list some concepts here, but also need to further digestion.

1. Objects in PowerShell

"Case": get-process

As shown, the results of the command execution are presented in tabular form, each line is called an "object", each column is called a "property", all rows are added together called "Collections", and "set" is called "table".

"Object": A table row that represents a single thing, such as a process, a service;

"Properties": Table columns, I understand: like the entity properties in a relational database, grouped together to describe an entity, such as: process name;

"Collection": the collection of all related objects in memory after the command executes;

"Method": that is, the behavior, that is, what the object can do, such as: Kill a process.

2. Why PowerShell uses objects

This part looks specious, indefinitely. The idea is that, compared to the Shell in Unix or Linux, the former is purely text-based, and PowerShell uses objects to eliminate all the overhead of text manipulation, allowing the user to focus on accomplishing the task. PowerShell only needs to know the column name, no need to care about the order of the columns in the table, or rewrite the command after the column is moved.

This part has to be compared to see.

3. Explore Objects

"Command": Get-member

"Alias": Gm

"Role": Understanding Object Content

"Usage": Used after any command that can produce some output.

"Case": get-process | Gm, Get-service | Gm

Completely dizzy dishes, slowly, slowly.


PowerShell Learning Notes-Object (i)

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.