从磁盘中返回磨损柜台

发布于 2025-02-01 20:12:16 字数 431 浏览 4 评论 0原文

只是试图为我的工作自动化一些事情,我需要将磨损报告给txt文件,然后我可以将其编译为已通过电子邮件发送的报告。

在下面运行的是,在下面运行的是要导出到

Get-Disk | Where-Object {$_.IsBoot -eq 'True'} | Get-StorageReliabilityCounter | Select Wear

下面的文件的变量是我正在运行的是生成我需要的文件,但是实际上,没有任何

$DiskWear = Get-Disk | Where-Object {$_.IsBoot -eq 'True'} | Get-StorageReliabilityCounter | Select Wear
$DiskWear.Trim > trimmed.txt

帮助,没有任何帮助:)

Just trying to automate some things for my job and I need to report the wear to a txt file that I can later compile into a report that gets emailed.

Having some trouble with getting it to populate the txt file with the wear indication, below is what I'm running and it gives me the variable I want to export to a file

Get-Disk | Where-Object {$_.IsBoot -eq 'True'} | Get-StorageReliabilityCounter | Select Wear

Below is what I'm running that generates the file I need but doesn't actually fill with anything

$DiskWear = Get-Disk | Where-Object {$_.IsBoot -eq 'True'} | Get-StorageReliabilityCounter | Select Wear
$DiskWear.Trim > trimmed.txt

Any help appreciated :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文