> $OutFile 我想要 pdf 格式的输-6ren">
gpt4 book ai didi

powershell - 如何使用powershell以pdf格式保存任何powershell脚本的输出?

转载 作者:行者123 更新时间:2023-12-02 22:45:55 25 4
gpt4 key购买 nike

代替:

Get-ChildItem -Path C:\ -Force | ConvertTo-Html -Body "<H2>C Drive Details</H2>" >> $OutFile

我想要 pdf 格式的输出而不是 html

最佳答案

如果你去这个网站http://www.powertheshell.com/modules/

您可以下载 PDFTools 模块并将内容提取到您的模块路径,然后 Import-Module PDFTools ,这会给你一个新的命令Out-PTSPDF您可以将结果传递给它。

@JamesC 是对的,没有“ native ”方法可以完成此操作。

关于powershell - 如何使用powershell以pdf格式保存任何powershell脚本的输出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53153591/

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