Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想创建一个 powershell 脚本,生成一个报告,显示远程服务器上的所有压缩文件/文件夹。压缩文件是指使用内置 Windows 压缩实用程序压缩的文件,而不是 zip。但是我很难弄清楚如何本地化压缩文件。我应该使用 WMI 还是?
谢谢弗兰克
来自 .NET的FileInfo/DirectoryInfo类(我假设所有这些对于 PowerShell 来说都很容易获得)将为您提供包含压缩属性的文件属性(如果已压缩)。
FileInfo/DirectoryInfo