Format-Table cmdlet 将命令的输出格式化为表中每个列中对象的选定属性。 对象类型确定每个列中显示的默认布局和属性。 可以使用 属性 参数选择要显示的属性。 PowerShell 使用默认格式化程序定义对象类型的显示方式。 可以使用 .ps1xml 文件创建自定义视图,这些视图显示具
最常見的格式命令是 Format-Table 與Format-List。 也可以使用 Format-Wide 和Format-Custom,但較不常見。 如第3 章所述,命令如果返回超過四個屬性,預設將是清單格式,除非使用自定義格式。 PowerShell 複製 Get-Service -Name w32time | Select-Object -Property Status, DisplayName, Can* Output 複製 ...
Get-Process-Nameiexplore |Format-List-Property* Format-List雖然命令對於顯示詳細數據很有用,但如果您想要包含許多項目的輸出概觀,則更簡單的表格式檢視通常更有用。 使用Format-Table 進行表格輸出 如果您使用Format-Table沒有指定屬性名稱的 Cmdlet 來格式化命令的Get-Process輸出,則會取得與不使用 Cmdlet 完全...
你还可以通过使用 Wrap 参数让较长的 Format-Table 数据在其显示列中自动换行。 仅使用 Wrap 参数不一定会实现所需的操作,因为如果你不同时指定 AutoSize,它会使用默认设置: PS> Get-Process -Name powershell | Format-Table -Wrap -Property Name,Id,Company,Path Name Id Company Path --- -- --- --...
Format-Table [[-Property] <Object[]>] [-AutoSize] [-RepeatHeader] [-HideTableHeaders] [-Wrap] [-GroupBy <Object>] [-View <string>] [-ShowError] [-DisplayError] [-Force] [-Expand <string>] [-InputObject <psobject>] [<CommonParameters>]Description...
Format-Table [[-Property] <Object[]>] [-AutoSize] [-RepeatHeader] [-HideTableHeaders] [-Wrap] [-GroupBy <Object>] [-View <string>] [-ShowError] [-DisplayError] [-Force] [-Expand <string>] [-InputObject <psobject>] [<CommonParameters>]Description...
leaving a big giant hole in the middle. If you use Select-Object to determine the properties to be displayed onscreen there isn't much you can do about that; Select-Object doesn't offer many formatting options. With Format-Table, however, you can add the AutoSize parameter, ...
#SYNTAXGet-Help[[-Name]<string>][<CommonParameters>]#OPTIONS-Category<string[]>-Component<string[]>-Functionality<string[]>-Name<string>-Parameter<string>-Path<string>-Role<string[]><CommonParameters> 基础实例: 代码语言:javascript 代码运行次数:0 ...
类型: WebRequestMethod 接受的值: Default, Get, Head, Post, Put, Delete, Trace, Options, Merge, Patch Position: Named 默认值: None 必需: False 接受管道输入: False 接受通配符: False-NoProxy指示cmdlet 不会使用代理访问目标。 使用此功能可绕过 Internet 设置中配置或环境中指定的代理。 此参数是在...
details> <command:name> Format-Table </command:name> <maml:description> <maml:para>Formats the output as a table.</maml:para> </maml:description> <command:verb>format</command:verb> <command:noun>table</command:noun> <dev:version></dev:version> </command:details> ... </command:...