gpt4 book ai didi

powershell - 在 PowerShell 中将输出转换为 HTML 格式

转载 作者:行者123 更新时间:2023-12-03 13:18:16 25 4
gpt4 key购买 nike

我正在学习 PowerShell。在我的实验中,我使用了以下命令:

PS C:\Windows\system32> gci -path C:\windows\  | Where-Object{$_.LastWriteTime -
gt "01-04-2011"} | Format-List -property Fullname | ConvertTo-Html | out-file E:
\PowerShell\Out.html

我期望输出类似于控制台中显示的输出(如:FullName:C:\Windows...)。但是当我打开 Out.html 时,它有一些奇怪的东西,比如:

ClassId2e4f51ef21dd47e pageHeaderEntry pageFooterEntry autosizeInfo shapeInfo groupingEntry



我在这里缺少什么?

最佳答案

使用 select-object代替 format-list .

关于powershell - 在 PowerShell 中将输出转换为 HTML 格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6000201/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com