用于计算 Windows Server 2008 上安装点上的可用空间和驱动器空间的 C# WMI 代码
我找到了大量有关如何查看物理驱动器的信息,但我需要监视物理驱动器上的多个安装点。我更愿意通过 wmi 来完成此操作,但任何可以完成此操作的 .NET 对象也可以。
I have found plenty of information on how to look at physical drives but I need to monitor several mount points on my physical drives. I would prefer to do this through wmi but any .NET objects that could do it would be fine as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所以我终于弄清楚了这一点。对于 WMI,它是一场与糟糕文档的持续斗争,并且需要您自己解决这些问题。
资源
用于测试查询的 wbemtest
wbemtest 参考
用于生成多种语言的 wmi 脚本的脚本
scriptomatic
代码:
So I figured this one out finally. With WMI its a constant battle against poor documentation and just figuring out this stuff on your own.
RESOURCES
wbemtest for testing your queries
wbemtest reference
scriptomatic for generating wmi scipts in several languages
scriptomatic
The code: