我能用Windows PowerShell做什么:在多个栏目中显示数据
来源:互联网 发布:php 阿里云短信发送 编辑:程序博客网 时间:2024/04/29 13:23
注:本篇文章,未在联系作者以及得到许可的情况下, 禁止以任何形式进行转载。
By:Anders Mail:katrina520@163.com
在多个栏目中显示数据
Format-Wide cmdlet允许你返回单个项目(如进程名)和在多种栏中目显示数据。默认情况下,Format-Wide显示在专栏里显示数据,Get-Process这个命令会返回进程信息然后在两栏里显示进程的名称:
Get-Process | Format-Wide
换句话说,你回得到类似这样的信息:
alg apdproxy
asghost ati2evxx
ati2evxx atiptaxx
BTStackServer BTTray
btwdins csrss
ctfmon DLACTRLW
eabservr explorer
HP Wireless Assistant HPQTOA~1
hpqwmi hpqwmiex
asghost ati2evxx
ati2evxx atiptaxx
BTStackServer BTTray
btwdins csrss
ctfmon DLACTRLW
eabservr explorer
HP Wireless Assistant HPQTOA~1
hpqwmi hpqwmiex
另外,你也可以用 -column参数指定专栏的数目;这个命令显示四个栏目的进程信息:
(英文原文将Column参数写成Columns这一为错误,因在PS 1.0中测试 Format-Table : 找不到与参数名称“Columns”匹配的参数。所以译者将错误Columns更正为Column)
Get-Process | Format-Wide –column 4
如果任何一个进程名称长于所分配的栏目空间,这些名字将截断,所以(注意FastUserSwitching不太适合) :
FastUserSwitchin... helpsvc
hpqwmiex HTTPFilter
InoRPC InoRT
hpqwmiex HTTPFilter
InoRPC InoRT
如果你不知道当你显示信息有多少栏目时,那为什么不能让Windows PowerShell数字为你指出?刚刚使用 - autosize参数和Windows PowerShell会计算最大的栏目数,可用于无截断数据:
Get-Process | Format-Wide –autosize
英文原文:http://www.microsoft.com/technet/scriptcenter/topics/msh/cmdlets/format-wide.mspx
- 我能用Windows PowerShell做什么:在多个栏目中显示数据
- 我能用Windows PowerShell做什么:过滤返回的数据
- 我能用Windows PowerShell做什么:把数据显示成一个列表
- 我能用Windows PowerShell做什么:保存 Windows PowerShell 别名
- 我能用Windows PowerShell做什么:暂停 Windows PowerShell 脚本
- 我能用Windows PowerShell做什么:执行日期算法
- 我能用Windows PowerShell做什么:复制文件或文件夹
- 我能用Windows PowerShell做什么:重命名文件和文件夹
- 我能用Windows PowerShell做什么:执行日期算法
- 我能用Windows PowerShell做什么:检索一个特定项目
- 我能用Windows PowerShell做什么:检索数字签名
- 我能用Windows PowerShell做什么:列出特殊的成员
- 我能用Windows PowerShell做什么:基本统计计算
- 我能用Windows PowerShell做什么:改变 Windows PowerShell 脚本执行策略
- 我能用Windows PowerShell做什么:创建一个新的 Windows PowerShell 别名
- 我能用Windows PowerShell做什么:列出你所有的 Windows PowerShell 别名
- 我能用Windows PowerShell做什么:检查计算机的日期与时间
- 我能用Windows PowerShell做什么:日期与时间信息清单
- 面向对象思想
- ofstream无法访问带汉字的目录中的文件
- [zz]scanf()函数释疑
- 高级SELECT语句
- 驱动SYS开发总结
- 我能用Windows PowerShell做什么:在多个栏目中显示数据
- VMware Workstation v6.0.0 SN
- 基于Qt/Embedded和Qtopia的GUI设计
- 抽象类和接口的区别
- baidu好?google好?
- 史上最扯Java图形绘制(J2SE)之一JAVA动画效果
- 百度招聘笔试考试题-附面试经验
- 《pro Spring》学习笔记之使用Spring+James邮件服务器发送带有附件的HTML邮件
- 第一章 第二节 本书游戏引擎工程的不同点