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

Nav*_*een 6 powershell

我正在学习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
Run Code Online (Sandbox Code Playgroud)

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

ClassId2e4f51ef21dd47e pageHeaderEntry pageFooterEntry autosizeInfo shapeInfo groupingEntry

我在这里错过了什么?

Emi*_*ggi 6

用来select-object代替format-list.