"192" PowerShell related knowledge

Source: Internet
Author: User

Dictation instructions:

  1. True cmdlet command referred to by the query alias
    Get-alias-name ls
  2. View available aliases, either via "LS alias:" or "Get-alias"
  3. To view the aliases of all commands that begin with the Remove cmdlet
    Dir alias: | where {$_. Definition.startswith ("Remove")}
    description : dir alias: Gets an array of aliases, traversed by the where array elements,$_ represents the current element, and alias's definition is of type string because PowerShell support. The string class in Net,.net has a method startswith. It is widely used in PowerShell through the Where filtering collection.
  4. The following example shows how to use a script block as the value of a property parameter. This command displays an integer from 1 through 35, grouped by the remainder, divided by 2 or 3.
    ps > 1..35 | group-object-property {$_% 2},{$_% 3}count Name                                                                           Group--------------                                                               6 1, 1 {1, 7, 13, 19 ...}                                                               6 0, 2 {2, 8, 14, 20 ...}                                                               6 1, 0 {3, 9, 15, 21 ...}                                                              6 0, 1 {4, 10, 16, 22 ...}                                                              6 1, 2 {5, 11, 17, 23 ...}  5 0, 0 {6, 12, 18, 24 ...} 
  5. The last item of the array can be obtained by $a [-1], and so on

Get-command

Get-history
Get-service
Format-list
Format-table
Set-itemproperty
Get-module
Get-eventlog

"192" PowerShell related knowledge

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.