wmic linux python
sudo aptitude install wmi-client
Example of usage is;
wmic -U DOMAIN/administrator%password //10.99.92.9 “Select * from Win32_Service”
Lists all services, the first line it spits back is the fields which you can use this SQL like language to filter, so to see only the names of the services installed we’d do:
wmic -U DOMAIN/administrator%password //10.99.92.9 “Select Name from Win32_Service”
Or Name and State:
wmic -U DOMAIN/administrator%password //10.99.92.9 “Select Name,State from Win32_Service”
Or for just one service in this case the UPS service:
wmic -U DOMAIN/administrator%password //10.99.92.9 “Select Name,State from Win32_Service where name=’UPS'”
The language for the queries is called WQL and a reference is available here over at MSDN.
Hope this helps, this is only in Hardy as far as I’m aware.
http://stackoverflow.com/questions/20115578/access-wmi-via-python-from-linux
http://blog.csdn.net/wqiancangq/article/details/54575003
https://github.com/kanzure/python-wmi-client-wrapper
http://www.krenger.ch/blog/wmi-commands-from-linux/
https://pypi.python.org/pypi/wmi-client-wrapper
最新文章
- Daily Scrum02 12.17
- 关于用photoshop制作海报
- Asp.Net 高性能ORM框架 SqlSugar.ORM 2.8
- Scalaz(52)- scalaz-stream: 并行运算-parallel processing concurrently by merging
- 【BZOJ】1367: [Baltic2004]sequence
- Linux进程间通信-信号
- uva 437 hdu 1069
- VC++深入详解读书笔记-第七章对话框
- java实现 阿拉伯数字转换为汉字数字 算法
- 两句话帮你彻底记住gdb之eXamining memory
- WPF--鼠标右键菜单中的Command命令实现
- 【微信小程序开发】秒懂,架构及框架
- .net 平台下, Socket通讯协议中间件设计思路(附源码)
- 第6章 演示服务器和测试 - Identity Server 4 中文文档(v1.0.0)
- c#基础,单线程,跨线程访问和线程带参数
- WPF样式中TargetType 属性 (Property) 和 x:Key 属性 (Attribute)
- visualization of filters keras 基于Keras的卷积神经网络(CNN)可视化
- c++ 使用模板按类型统计stl多维容器中元素的数量
- git全局忽略文件
- WDS 三种模式