August 2008 - Posts

WMIC - Command Line WMI and SMS

Most of my posts seem to come about because someone asks me how to do something, so yet again some one asked me if I knew a way to 'control' SMS / SCCM from the command line.


This got me thinking. Most of the scripts I write or use manipulate WMI in some way, either on the site server or on the client it's self.

After a bit of research I found a command called WMIC - Windows Management Instrumentation Command-line.

I am not going to delve to much into it as there are some pretty good articles on the Internet regarding WMIC.

Below I have summarised the command.

WMIC is more intuitive than WMI, in large part because of aliases. Aliases take simple commands that you enter at the command line, then act upon the WMI namespace in a predefined way, such as constructing a complex WMI Query Language (WQL) command from a simple WMIC alias Get command

Here is a little exercise to start you off.

1.  Run noptepad.exe
2.  Run WMIC (You will see that  Windows installs it on the computer and displays the WMIC command prompt wmic:root\cli>. )
3.  At the WMIC prompt type the following process where name='notepad.exe' call terminate

How easy is that, nice way to kill a process

After the command runs, the WMIC command prompt reappears.

Now I know that you lot are never happy, and I hear the question 'Thats great but how do I do it all in one command'

WMIC also runs in noninteractive mode. This mode is especially useful when you need to complete a single task or you need to run WMIC commands in a batch file. To run a command in noninteractive mode, you start WMIC and run the command in the same line of code.

wmic /node:machinename process where name='notepad.exe' call terminate

So what can you do with it as far as SMS / SCCM goes

I thought I would try a couple of the most common process that people seem to always want to trigger, hardware and software inventory

wmic /namespace:\\root\ccm path sms_client call triggerschedule "{00000000-0000-0000-0000-000000000001}" /nointeractive

wmic /namespace:\\root\ccm path sms_client call triggerschedule "{00000000-0000-0000-0000-000000000002}" /nointeractive

I suddenly thought if anyone else has done anything like this, so after a quick Goggle I found Roger Zander's blog
Where he explains all this, and lists some more SMS / SCCM commands you can do with WMIC, saves me writing about them and duplicating work.

I started this article about two months ago, just shows that I ought to finish them more quickly...

Posted by scambler | with no comments
Filed under: , ,

SQL Server 2008 Beta Exams Published

If you are a follower of SQL server you may be intrested to know that there are now some Beta exams for SQL Server 2008

The first is Beta Exam 71-452: Designing a Business Intelligence Infrastructure Using Microsoft SQL Server 2008. This exam counts as credit towards the Microsoft Certified IT Professional: Business Intelligence Developer 2008. Registration has begun. The Beta exam period will be from August 13 - September 10, 2008. When registering for this exam, please use the promotional code: 3568C. All individuals interested in partaking in this exam are urged to

register now! For exam preparation, please visit http://www.microsoft.com/learning/exams/70-450.mspx

The second offering is the Beta Exam 71-450: PRO: Microsoft SQL Server 2008, Designing, Optimizing, and Maintaining a Database Administrative Solution. This exam counts as credit towards the Microsoft Certified IT Professional: Database Administrator 2008. Registration begins on August 15, 2008. The exam can be taken between August 18 - September 16, 2008. When registering for this exam, please enter the promotional code: 239F4. Start registering on August 15 to book your place. To get ready for this exam, please go to http://www.microsoft.com/learning/exams/70-452.mspx

So why take these exams?  They are free!  Also, they give you credentials that are recognized in the marketplace.  Employers feel confident in the skills and abilities of those who have achieved certification from Beta exams.
 
So what are you waiting for?  Beta exams have limited availability and once all places have been filled, no additional seats will be offered.  Remember, these exams are free for you to take.  You must register 24 hours prior to taking the Beta exam, and you will be given 4 hours to complete it.
 
Testing is held at Prometric testing centers worldwide, although the exams are not available in India, Pakistan, and China.
 
To register in North America, please call Prometric at 800 755-EXAM (800-755-3926).  If registering outside the US or Canada, please go to http://www.register.prometric.com/ClientInformation.asp
 
Do not wait any longer!  Now is the time to get another step closer to earning your certification.

Posted by scambler | with no comments
Filed under: , ,