PowerShell 格式化_下

本文介绍了PowerShell中的格式化Cmdlets,包括Format-Table、Format-List和Format-Wide的用法。Format-Table用于展示表格,Format-List以列表形式展示对象属性,Format-Wide显示宽列表。通过哈希表结构可以定制对象属性,如添加自定义VM大小。输出结果可以定向到文件、打印机或主机,Out-GridView提供交互式视图。要注意避免在命令末尾直接使用format-cmdlets,以免导致非预期输出。
摘要由CSDN通过智能技术生成

在PowerShell中有四种格式化的 Cmdlets。

Format-Table(格式化表格)

 The Format-Table cmdlet formats the output of a command as a table with the selected properties of the object in each column.

Format-List(格式化列表)

 The Format-List cmdlet formats the output of a command as a list of properties in which each property is displayed on a separate line.

把数据水平的展现到一个表中。

Format-List(格式化列表)

The Format-Wide cmdlet formats objects as a wide table that displays only one property of each object.

用于展示一个宽列表,它仅展示要给单独属性的值,所以它的-property参数仅接受一个属性名,而不是列表,并且不接受通配符。

Get-Process | Fo

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值