zoukankan      html  css  js  c++  java
  • PowerShell常用的属性

    get-location | get-member  -membertype  property

    -------获取对象的属性----------

    获取对象特定的成员, 湖区.Net Framwork 的原始属性和方法


    PS C:Usersvol_20120330> get-location | get-member -view base


    TypeName: System.Management.Automation.PathInfo

    Name MemberType Definition
    ---- ---------- ----------
    Equals Method bool Equals(System.Object obj)
    GetHashCode Method int GetHashCode()
    GetType Method type GetType()
    ToString Method string ToString()
    Drive Property System.Management.Automation.PSDriveInfo Drive {get;}
    Path Property System.String Path {get;}
    Provider Property System.Management.Automation.ProviderInfo Provider {...
    ProviderPath Property System.String ProviderPath {get;}

    格式化输出

      前面的文章中提到过部分关于格式化的内容,这里进一步进行介绍。

      PS支持4个格式化cmdlet:  format-wide、 format-list、format-table、format-custom; 这里仅介绍前面三个。

      四个命令均需要管道输出对象作为输入;四个cmdlet均有默认的输出属性,如果不进行指定,则输出默认的属性。

    3、1  format-wide  

      格式化命令默认输出不同数量的属性,format-wide默认仅输出一个默认属性。

    Exp:


    PS C:Usersvol_20120330> get-command | format-wide

  • 相关阅读:
    React16+Redux 实战企业级大众点评Web App
    一类图上二选一构造问题
    O(1)判断两点之间是否有边
    ARC112F Die Siedler
    【学习笔记】同余最短路
    CF1034D Intervals of Intervals
    CF1034C Region Separation
    CF650E Clockwork Bomb
    莫队题三道(LOJ6273, CF1476G, CF700D)
    CF1290D Coffee Varieties (hard version)
  • 原文地址:https://www.cnblogs.com/micro-chen/p/5775830.html
Copyright © 2011-2022 走看看