Chinaunix首页 | 论坛 | 博客
  • 博客访问: 133702
  • 博文数量: 51
  • 博客积分: 3010
  • 博客等级: 中校
  • 技术积分: 400
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-22 14:47
文章分类

全部博文(51)

文章存档

2009年(8)

2008年(43)

我的朋友

分类: WINDOWS

2008-07-10 22:22:34

WMIC
windows management instrumentation command line(WMIC)
- install application
- perform mainterance
- update the server
- create lnk files
- set security

C:\DOCUME~1\student>wmic os/?

OS - Installed Operating System/s management.

HINT: BNF for Alias usage.
( [WMIObject] | [] | [] ) [lause>].

USAGE:

OS ASSOC []
OS CALL []
OS CREATE
OS DELETE
OS GET [] []
OS LIST [] []
OS SET []

C:\DOCUME~1\student>wmic

wmic:root\cli>os list
BootDevice               BuildNumber  BuildType            CodeSet  CountryCode
\Device\HarddiskVolume1  2600         Multiprocessor Free  1252     1

wmic:root\cli>os get csname, locale, bootdevice
BootDevice               CSName    Locale
\Device\HarddiskVolume1  PE326103  0409

wmic:root\cli>service where (state="running") get caption,name
Caption                                               Name
Application Layer Gateway Service                     ALG
Windows Audio                                         AudioSrv
avinitnt                                              avinitnt
Background Intelligent Transfer Service               BITS
Computer Browser                                      Browser
Contrl Center of Storm Media                          ccosm
Cryptographic Services                                CryptSvc
DCOM Server Process Launcher                          DcomLaunch
DHCP Client                                           Dhcp
Logical Disk Manager                                  dmserver
DNS Client                                            Dnscache
DvpApi                                                dvpapi
Error Reporting Service                               ERSvc
Event Log                                             Eventlog
COM+ Event System                                     EventSystem
Help and Support                                      helpsvc
Server                                                lanmanserver
Workstation                                           lanmanworkstation
TCP/IP NetBIOS Helper                                 LmHosts
Machine Debug Manager                                 MDM
SQL Server (SQLEXPRESS)                               MSSQL$SQLEXPRESS
Network Connections                                   Netman
Symantec Ghost Win32 Client Agent                     NGClient
Network Location Awareness (NLA)                      Nla
Plug and Play                                         PlugPlay
IPSEC Services                                        PolicyAgent
Protected Storage                                     ProtectedStorage
Remote Access Connection Manager                      RasMan
Remote Registry                                       RemoteRegistry
Remote Procedure Call (RPC)                           RpcSs
Security Accounts Manager                             SamSs
Task Scheduler                                        Schedule
schscnt                                               schscnt
Secondary Logon                                       seclogon
System Event Notification                             SENS
Windows Firewall/Internet Connection Sharing (ICS)    SharedAccess
Shell Hardware Detection                              ShellHWDetection
Print Spooler                                         Spooler
SQL Server Browser                                    SQLBrowser
SQL Server VSS Writer                                 SQLWriter
System Restore Service                                srservice
SSDP Discovery Service                                SSDPSRV
StarWind AE Service                                   StarWindServiceAE
Windows Image Acquisition (WIA)                       stisvc
Telephony                                             TapiSrv
Terminal Services                                     TermService
Themes                                                Themes
Distributed Link Tracking Client                      TrkWks
Messenger Sharing Folders USN Journal Reader service  usnjsvc
VMware Authorization Service                          VMAuthdService
VMware DHCP Service                                   VMnetDHCP
VMware Virtual Mount Manager Extended                 vmount2
VMware NAT Service                                    VMware NAT Service
Windows Time                                          W32Time
WebClient                                             WebClient
Windows Management Instrumentation                    winmgmt
Security Center                                       wscsvc
Automatic Updates                                     wuauserv
Wireless Zero Configuration                           WZCSVC

wmic:root\cli>service where (caption="telnet") get state
State
Stopped

wmic:root\cli>service where (caption="telnet") call startservice
Execute (\\PE326103\ROOT\CIMV2:Win32_Service.Name="TlntSvr")->startservice() (Y/N/?)? y
Method execution successful.
Out Parameters:
instance of __PARAMETERS
{
        ReturnValue = 14;
};

wmic:root\cli>

wmic:root\cli>service where (state="stopped") get caption,name
Caption                                               Name
Alerter                                               Alerter
Application Management                                AppMgmt
ASP.NET State Service                                 aspnet_state
Indexing Service                                      CiSvc
ClipBook                                              ClipSrv
.NET Runtime Optimization Service v2.0.50727_X86      clr_optimization_v2.0.50727_32
COM+ System Application                               COMSysApp
Logical Disk Manager Administrative Service           dmadmin
Wired AutoConfig                                      Dot3svc
Extensible Authentication Protocol Service            EapHost
Fast User Switching Compatibility                     FastUserSwitchingCompatibility
Google Updater Service                                gusvc
Human Interface Device Access                         HidServ
Health Key and Certificate Management Service         hkmsvc
HTTP SSL                                              HTTPFilter
IIS Admin                                             IISADMIN
IMAPI CD-Burning COM Service                          ImapiService
Macromedia Licensing Service                          Macromedia Licensing Service
Messenger                                             Messenger
Microsoft Office Groove Audit Service                 Microsoft Office Groove Audit Service
NetMeeting Remote Desktop Sharing                     mnmsrvc
Distributed Transaction Coordinator                   MSDTC
FTP Publishing                                        MSFtpsvc
Windows Installer                                     MSIServer
SQL Server Active Directory Helper                    MSSQLServerADHelper
Visual Studio 2005 Remote Debugger                    msvsmon80
Network Access Protection Agent                       napagent
Network DDE                                           NetDDE
Network DDE DSDM                                      NetDDEdsdm
Net Logon                                             Netlogon
NT LM Security Support Provider                       NtLmSsp
Removable Storage                                     NtmsSvc
Microsoft Office Diagnostics Service                  odserv
OracleDevSuiteHome10gClientCache                      OracleDevSuiteHome10gClientCache
Office Source Engine                                  ose
Remote Access Auto Connection Manager                 RasAuto
Remote Desktop Help Session Manager                   RDSessMgr
Routing and Remote Access                             RemoteAccess
Remote Packet Capture Protocol v.0 (experimental)     rpcapd
Remote Procedure Call (RPC) Locator                   RpcLocator
QoS RSVP                                              RSVP
Smart Card                                            SCardSvr
Simple Mail Transfer Protocol (SMTP)                  SMTPSVC
MS Software Shadow Copy Provider                      SwPrv
Performance Logs and Alerts                           SysmonLog
Telnet                                                TlntSvr
VMware Agent Service                                  ufad-ws60
Universal Plug and Play Device Host                   upnphost
Uninterruptible Power Supply                          UPS
Volume Shadow Copy                                    VSS
World Wide Web Publishing                             W3SVC
Windows Live Setup Service                            WLSetupSvc
Portable Media Serial Number Service                  WmdmPmSN
Windows Management Instrumentation Driver Extensions  Wmi
WMI Performance Adapter                               WmiApSrv
Network Provisioning Service                          xmlprov

wmic:root\cli>printer list status
Name                                    Status
Xerox DocuPrint N2125 PS                Unknown
Send To OneNote 2007                    Unknown
Auto Xerox DocuPrint N2125 on PE326090  Unknown
Auto Send To OneNote 2007 on PE326090   Unknown

wmic:root\cli>process

阅读(870) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~