当我使用“格式表”显示使用[pscustomobject]创建的数据时,如果列中的数据是从命令点的输出中提取的值,则在其列的右侧显示。但是,如果我手动设置了一个值,则显示在其列的左侧。
使用“ netapp.ontap”模块:
$volSis = Get-NcSis -Name 'MyVolume'
$object = [pscustomobject]@{
'Compression' = $volSis.IsCompressionEnabled #This resolves to 'True' or 'False'
'Dedupe' = 'Foo'
}
$object | Format-Table
输出是:
Compression Dedupe
----------- ------
True Foo
有什么方法可以强制表格(或右)合理的表中的所有列?另外,是否可以将手动创建的数据(即本示例中的“ foo”)进行正确进行?