Blog

Posts Tagged ‘wmi’

Where do I begin?

Tuesday, December 2nd, 2008 by Jeffery Hicks
"I'm new to scripting and need a book recommendation." "Should I learn VBScript or PowerShell?" "What are some good books for learning scripting?" These are natural and common questions. A few years ago the answers would have been simple. But today if you are just getting started with administrative scripting, the answers only bring more questions. The real question isn't what book should you read but what technology should you learn? If you are a a SAPIEN blog reader I'm going to assume that the choice comes down to VBScript or PowerShell. The quick answer is to learn both, but I realize that's not practical. So let's look at this a bit further and realize that some of this will change once PowerShell v2.0 is released as part of Windows 7 and depending on your adoption of Windows 7.   More »

December PowerShell One-Liner

Monday, December 1st, 2008 by Jeffery Hicks
This month's PowerShell one-liner uses WMI to query event logs on remote computers. Specifically it is searching for logs that record when the Event Log service has started. This is another way you can, determine when a computer has started. It's not foolproof of course but the one-liner should serve as an example of querying WMI on multiple machines.   More »

PrimalScript Samples

Monday, November 10th, 2008 by Jeffery Hicks
Here's another tidbit about PrimalScript that you may not be aware of. Not only does PrimalScript offer a large number of code snippets that you can drag and drop into your scripting or development project, but it also includes a large number of complete sample scripts.   More »

November PowerShell One-liner

Monday, November 3rd, 2008 by Jeffery Hicks
The following one line PowerShell expression should show you who is logged on to a specific server and desktop and for how long. Most logon sessions use a single instance of Explorer.exe, although it is possible for a user to manually start additional instances of Explorer.exe.   More »

Getting Started with PrimalForms

Monday, November 3rd, 2008 by Jeffery Hicks
I hope you are as excited about the release of PrimalForms as I am. In the past creating a Windows form in PowerShell was a very tedious task and one I rarely used except for the most simplest of forms. No more. The free PrimalForms tool lets me create a very rich Windows form using a WYSIWYG editor. I can export the form to a file, add my PowerShell code and call it a day.   More »

Techmentor Las Vegas ’08

Saturday, October 25th, 2008 by Jeffery Hicks
If you didn't make it to Techmentor this year, you missed out on some great stuff. As promised, here are a collection of zip files with my conference demos. If you didn't make it to the show you are still welcome to download, although they may not all make sense to you out of context. I think I've gathered everything but if there as a particular demo you can't find, let me know and I'll either check my library or attempt to re-create it.   More »

WBEMTest Demo

Wednesday, September 24th, 2008 by Jeffery Hicks
If you've sat in on any of my WMI related classes or conference sessions, I know you've heard me talk about using WBEMTest to test WMI connectivity and your WMI queries. WBEMTest has been around as part of Microsoft operating systems for a long time but many administrators have never heard of it. If you are troubleshooting a WMI related script this is the first place you should go, especially when troubleshooting remote server connections and alternate credentials. If you can't authenticate to the server using WBEMTest, your script is likely to fail as well. Usually if there is a connection error, the error message should lead you in the right direction. You should also use WBEMTest to test and refine your query. Once you know it works, then copy and paste it into your script (VBScript or PowerShell or anything else for that matter). If you script still has a problem, it is likely not your WMI query because you've already verified it works. I put together a short video demo on how to use WBEMTest. To start it, click Start - Run and type WBEMTEST. The video shows you the rest.   More »

Techmentor NYC 2008 Demos and Slides

Monday, September 15th, 2008 by Jeffery Hicks
I've posted a few zip files with my slides and demos from Techmentor NYC. You'll find the files in the Essentials section of ScriptingAnswers.com.  Click here to get them. Some of these sessions will be done again at Techmentor Las Vegas next month, plus a whole lot more.…   More »

Techmentor NYC Wrap Up

Tuesday, September 9th, 2008 by Jeffery Hicks
Sorry you didn't make it to the Big Apple for the last Techmentor conference. It was a small and intimate show which I always like because it is easier to talk with attendees and answer questions. Plus your odds are increased for all the freebies, include free books! Here's a taste of what you missed.   More »

Techmentor NYC

Wednesday, September 3rd, 2008 by Jeffery Hicks
I've been getting things ready for my next Techmentor appearance. This one is practically in my back yard. I'll be in NYC on Monday and Tuesday next week.   More »