zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    SRS之SrsRtmpConn::service_cycle详解
    SRS之SrsRtmpServer::connect_app详解
    SRS之RTMP连接处理线程conn:接收客户端推流
    SRS之RTMP handshake
    SRS之RTMP的TCP线程(即监听线程)
    CSPS模拟 77
    CSPS模拟 76
    CSPS模拟 75
    CSPS模拟 74
    CSPS模拟 73
  • 原文地址:https://www.cnblogs.com/diyunpeng/p/6746409.html
Copyright © 2011-2022 走看看