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
wmic linux python的更多相关文章
- kali linux Python开发环境初始化
kali linux Python 黑客编程1 开发环境初始化 为什么要选择Python? Python作为目前Linux系统下最流行的编程语言之一,对于安全工作者的作用可以和C++相提并论.Pyth ...
- linux python 安装 nose lapack atlas numpy scipy
linux python 安装 nose lapack atlas numpy scipy --http://lib.csdn.net/article/python/1262 作者:maple1149 ...
- linux python更新
linux的yum依赖自带的Python,为了防止错误,此处更新其实是再安装一个Python 1.查看默认python版本 python -v 2.安装gcc,用于编辑Python源码 yum ins ...
- 【Linux.Python】Python进程后台启动
嗯,比较忧伤. 前几天写了个tornado,启动了,很开心,后来每天要用时都发现it是kill掉的.好吧,是我太蠢啦.百度了下资料 python的启动方式: 1 python yourfile.py ...
- Linux & Python 导航目录
< Python学习手册(第4版)>< Python Cookbook(第2版)>中文版.pdf< Python 高级编程>< Python 基础教程 第二版 ...
- linux python虚拟环境 相关的
为什么要用虚拟环境 在使用python开发过程中,各种业务需求多了,导致工程任务多了,难免会碰到不同的工程依赖不同版本库的问题,;或者是在开发的时候不想让物理环境里充斥各种各样的库,引发依赖环境灾难, ...
- linux python调试技巧
Linux下Python基础调试 http://blog.163.com/liuyuhuan0915@126/blog/static/78265448201141662828820/ 当手边没有IDE ...
- Linux /python --- zipinfo命令
Linux zipinfo命令用于列出压缩文件信息. 执行zipinfo指令可得知zip压缩文件的详细信息. zipinfo [-12hlmMstTvz][压缩文件][文件...][-x <范本 ...
- 运维利器:钉钉机器人脚本告警(Linux Python 篇)
写在前面的话 在前面的博客中已经具体提到了如何获取对的机器人的 Token 等操作,不清楚的可以参考之前写的 [运维利器:钉钉机器人脚本告警(Linux Shell 篇)]这篇博客的前部分. 本文主要 ...
随机推荐
- JavaScript:理解事件循环
话说js是单线程的,它通过浏览器事件循环轮询事件队列,来实现异步.然而,事件循环的时机是什么时候?浏览器是如何帮助JS引擎线程实现异步的? 浏览器页面进程的四个线程 首先说一下,chrome会为每一个 ...
- 紫书 习题 10-7 UVa 10539(long long + 素数筛)
注意要开long long 如果int * int会炸 那么久改成long long * int #include<cstdio> #include<vector> #incl ...
- 安装Orcacle后使用DBCA(Database Configuration Assistant)卡住的问题
转自:http://hi.baidu.com/kissbaofish/item/2f56d326742c39454799620b 用dbca建库停在46% 是export NLS_LANG='amer ...
- Spring MVC学习------------WebApplicationContext
父子上下文(WebApplicationContext) 假设你使用了listener监听器来载入配置.一般在Struts+Spring+Hibernate的项目中都是使用listener监听器的. ...
- HTML5学习笔记简明版(11):新增的API
HTMLDocument上的扩展 HTML5在DOM Level 2 HTML上扩展了一些HTMLDocument的接口.这些接口在全部实现了Document接口的元素对象上进行了实现. HTML5在 ...
- Iocomp控件之数字显示【图文】
Iocomp关于数字显示有自己的一套方案.并且效果非常棒哦 效果图: 插入控件: 默认效果: 随意改动属性后: 加入变量 调用函数: ); 效果图:
- 当我们谈论Erlang Maps时,我们谈论什么 Part 1
Erlang 添加 Maps数据类型并非非常突然,由于这个提议已经进行了2~3年之久,仅仅只是Joe Armstrong老爷子近期一篇文章Big changes to Erlang掀起不小了 ...
- doT.js灵活运用之嵌入使用
基础的base_info_area <div id="base_info_area"></div> <script type="text/h ...
- 参考《Python数据处理》中英文PDF+源代码
在实际操作中掌握数据处理方法,比较实用.采用基于项目的方法,介绍用Python完成数据获取.数据清洗.数据探索.数据呈现.数据规模化和自动化的过程.主要内容包括:Python基础知识,如何从CSV.E ...
- 51nod 最大子矩阵和
一个M*N的矩阵,找到此矩阵的一个子矩阵,并且这个子矩阵的元素的和是最大的,输出这个最大的值. 我们可以降维,枚举矩形的长,然后算出一个一维数组,然后就转化成了最大字段和问题 #include< ...