Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


July 05, 2000

Windows Management Instrumentation


RSS
Subscribe to Windows IT Pro | See More Internet Explorer (IE) Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

Windows Management Instrumentation (WMI) is a scriptable, scalable management infrastructure. WMI is part of Windows 2000 (but available for Windows NT 4.0 and Windows 9x) and can help you manage your enterprise systems, applications, and networks as they become large and complex.

You'll find that WMI has several key features that are extremely valuable in solving the complex administrative tasks that challenge you today. Some of those features and capabilities are

  • Uniform Scripting API
  • Discoverability and navigation
  • Query capability
  • Powerful event publication and subscription

However, what I find most exiting about WMI is its remote administration capabilities. Objects that you manage within WMI are, by definition, available to applications and scripts both locally and remotely. No additional work is necessary for managing remote objects.

Before I delve into the technical details of WMI, let me give you some examples of the power this feature offers. With WMI, you can

  • Identify and list all services on a server that you have configured to run in Automatic Start mode but that are currently stopped
  • Identify and list all the NTFS partitions on a server that have less than 10 percent free space left
  • Execute a backup on a Microsoft SQL Server, then dump the transaction log
  • Launch a program on your server through a WMI method
  • Set up an event consumer that watches for a specific event in the system log, then sends an email message when that event occurs.
  • Reconfigure your event consumer script to request a system event whenever a server's CPU utilization exceeds 90 percent

Now, before you say, "Well, I don't need WMI to do all that," let me tell you that you can do everything that I identified above and

more . . . ON A REMOTE MACHINE! You need a security context to run under <username> and <password>, but you can use WMI to remotely execute a program.

With a Windows Script Host (WSH) script called exec.vbs (which I have made available to "IIS Administrator" subscribers in the IIS Administrator Code Library [http://www.iisadministrator.com]), you can execute programs remotely. Consider the following WSH script command and its parameters:

cscript exec.vbs /e "C:\Program Files\Internet _ 
		Explorer\Iexplore.exe" /s "TargetServer"  /u _
		"Administrator" /w "Password"

This command lets you run Microsoft Internet Explorer (IE) on a completely different computer called "TargetServer." Notice that you need to include an account and password that has security privileges on the remote machine.

WMI is modeled on the Web-Based Enterprise Management (WBEM) initiative and the Common Information Model (CIM) that the Distributed Management Task Force (DMTF) adopted. WMI provides a rich, extensible object model that lets you manage computer systems in a consistent, scriptable way—locally or remotely. Most core OS information and services are already instrumented as part of the basic WMI system that comes with Win2K and many other OSs, including third-party services that are under development.

Full documentation about using WMI (and building software that leverages WMI) is available in the WMI software development kit (SDK), which is part of the Microsoft Developer Network (MSDN) Win2K Platform SDK. You can also download the core WMI components needed for NT 4.0 and Win9x systems from this site.

End of Article



Reader Comments
Hello,
i tried this script and always get the following error:
Error 0x1A8 occurred in connecting to server selma.
Error description: Object required.

Please check the server name, credentials and WBEM Core

commandline use was :
cscript exec.vbs /e "C:\test.bat" /s "selma" /u "Administrator" /w "password"

Any ideas ?
thanks a million
Andi

Andreas Appelbaum February 02, 2001


This seems to happen if you do not have a profile on the remote machine. I am having the same problem and hope someone has a resolution ...

David Ell June 11, 2001


Even I have the same problem. Forget about a profile on a remote machine, this code does not work on the local machine as well. I have a standalone Win 2000 Prof running and I get the same error when I say
<br><br>
CScript fileman.vbs /T "c:\AuthTes
t" /s "VinodKumar" /U "Administrator" /W "issi"
<br><br>
where VinodKumar is the name of my local machine and Administartor is the default account.
<br><br>
Anybody with a soluition..

Shiva Ram June 17, 2001


Hi All.
It works GOOD.... Also with a Remote Server.
BTW... you need a "WBEM" Component on the Remote Server !!!
Without this Component , this Script Will NOT runs for the Remote Server , and will massage you this Error -
Error : 0x1A8 occurred in connecting to server selma.
Error description: Object required.
Please check the server name, credentials and WBEM Core.


Alex Frenkel July 15, 2001


Someone is going to have to help...I thought that WMI was a core component of Windows 2000??

How or where do we add a WBEM component to our remote server ? It's pretty obvious that either we have the wrong syntax or by default WMI cannot work with these admin scripts like exec.vbs.

Ian November 14, 2001


I just want to know why 2000 os is not covered. I know that the WMI components are works as a serivec on 2000. But some times 2000 also gives error error's like WMI core components are missing. This hapens when ever we are installing any program. Can i know what is the reason for this. and is installing WMI components is the solution.

It' s good January 10, 2004


Can someone please tell me WHAT is the solution to the "......Object required" problem/error as described above? Cant get exec.vbs to work . . . .

Magnus Lund April 08, 2004


I get this error Message when i boot up my Thinkpad T40 running Win 2000Pro:
"WinMgmt.exe has generated errors and will be closed by the Windows. You will need to restart your program. An error log has been created"

Then when i access the log I find this:
"Fri Jan 09 10:33:02 2004) : core was asked if ok to unload and returned 0x1(Fri Jan 09 10:34:44 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Wed Jan 14 12:01:25 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Wed Jan 14 14:30:56 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Mon Jan 26 15:21:45 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Tue Jan 27 07:18:32 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Tue Jan 27 07:54:34 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Tue Jan 27 08:23:37 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Thu Jan 29 13:48:46 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Fri Jan 30 15:53:44 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Sat Jan 31 09:25:31 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Sat Jan 31 09:30:07 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Mon Feb 02 07:32:50 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Mon Feb 02 13:28:04 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Mon Feb 02 14:51:42 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Tue Feb 03 15:36:54 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Thu Feb 05 11:27:42 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Mon Feb 09 08:00:46 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Mon Feb 09 14:19:02 2004) : core is being shut down by WinMgmt.exe, it returned 0x0(Fri Feb 13 07:43:05 2004)......"
This last part Core is being Shut down by WinMgmt.exe... keeps repeating up to now.

In addition not only does the error window pop up at restart and log on but it keeps poping up multiple times while i am working then it stops.

What is going on, can anyone help?

Innocent April 28, 2004


Hello all!
Try to use "/u machinename\username"
or "/u domain\username"

activenet May 10, 2004


This is a bit of a sticky wicket. I own a stand-alone laptop Dell Inspiron 8000 that I purchased for my daughter as her college graduation gift. She used it for a couple years, and then gave it back to me since she had upgraded to something else. I then signed on w/ BellSouth FastAccess DSL and purchased a firewall. One of the log alerts indicated Windows Management Instrumentation. My comment is a question: Is it possible that this creep I work with and his computer-savvy lady friend in the company's ITS Dept are spying on me? If possible, then my suspicions are confirmed. Please let me know. I have already filed a complaint with BellSouth's internet abuse department. Thank you for your time, and I look forward to your response.

Diane Judson May 22, 2004


 See More Comments  1   2 

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
No Jobs, No Excitement at Apple's Last Macworld Keynote

Apple CEO Steve Jobs made the right move in skipping out on his company's last appearance at Macworld: In a Tuesday keynote address at the conference, Apple had no interesting new products to sell, opting instead to spend mind-numbing amounts of time on ...

Where is Microsoft NetMeeting in Windows XP?

...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...


SQL Server and Database Whitepapers StoreVault SnapManagers for Microsoft Exchange and SQL Server

Related Events Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Cloud Computing Forum: Integrating Software, Server and Storage as a Service into Your Enterprise IT Delivery Model

Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Check out our list of Free Email Newsletters!

SQL Server and Database eBooks Safeguarding Your Windows Servers

SQL Server Administration for Oracle DBAs

Taking Control: Monitoring the Windows Platform Proactively

Related SQL Server and Database Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2009 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing