My December Mr. Roboto column is now online This month’s tool is a PowerShell WinForm script that uses WMI to compress files. I used PrimalForms 2009 to build the graphical interface. The interface is essentially a wizard that lets you build a WMI query to find files and compress them. Results can be logged to…
Tag: WMI
Get Disk Quota
During a recent class I was teaching, a student asked about a way to get disk quota reports from Windows file servers. I knew there was a WMI class, Win32_DiskQuota, and had some old VBScript files. However, they were pretty basic and not as robust as I would have liked. So I worked up PowerShell…
Find That Service
Once again, the fine forum members at ScriptingAnswers.com come through and help get my PowerShell idea engine revving. The latest post posed this basic question: “I need to query my servers and find all services using a specific service account.” The poster thought this would be a good opportunity to learn PowerShell and I wholeheartedly…
Drive Report Console Chart
In thinking about some of my recent posts, I realize I should make clear that these scripts and functions are not necessarily good PowerShell examples. They don’t take advantage of objects and the pipeline. They are single purpose and one-dimensional. Not that there’s anything wrong with that. My recent examples, and the one I have…
Friendly WMI Dates
Gee..you think you know something only to find out you don’t. Or maybe this falls into the category of teaching an old dog new tricks.
When I first started using PowerShell several years ago, I learned about how to convert a WMI date to a more user friendly format…
Waynes World of Tips
I’ve blogged in the past about Wayne Martin and his outstanding list of command line tips. These are one line commands, some complex some simple, that you can use to accomplish a wide range of task. The overall number of tips is to 425 and Wayne recently reorganized them into 7 categories to make it…
Order Managing Active Directory with Windows PowerShell: TFM – Finally!
Yes, its finally true. You can finally get your hands on Managing Active Directory with Windows PowerShell: TFM. The book is being printed so you can get your copy today. You can order it today at ScriptingOutpost.com in both print and ebook format. Or if you prefer the best of both worlds get both as…
Practical PowerShell Scripts and Code
If you’ve been reading the Windows Administration in RealTime ejournal, I hope you’ve enjoyed my Practical PowerShell column. If not, you’re missing out. Each column solves a real-world and practical problem with PowerShell. I explain how the PowerShell code works and why. It’s not only a great way to learn PowerShell but you also get…
My Published Works
I’m trying out a new Live Write plugin for Amazon. Here is a list of books I have currently authored or co-authored. This list will continue to grow as I’m working on a new book now about managing Active Directory with PowerShell. WSH and VBScript Core: TFM by Jeffery Hicks Read more about this book……
Techmentor Just Around the Corner
The registration deadline for the first Techmentor conference of the year is almost upon us. I’ll be doing sessions on using Powershell to manage Active Directory, PowerShell and WMI, Logon Scripts and more. Plus, I’m always happy to hang out and chat. I always have a great time. Hope to see you there. If you…
Techmentor San Francisco 2008
I finished up my slide decks last week for the first Techmentor conference of the year in San Francisco (March 30 -April 3). If you’ve never been to a Techmentor conference you’re missing a great opportunity to hear and see your favorite IT speakers. Plus it’s a lot of fun to meet your peers, swap…
Online Script Library Resources
If you’re like me, you prefer not to re-invent the wheel when working on a scripting solution. You’d prefer to find a script written by someone else that accomplishes the same task(s). You might be tempted to jump immediately to Google or Yahoo. Before you do, let me give you some other online resources you…
NT Servers and WMI
My Mr. Roboto tools and scripts often need WMI. If your servers and desktops are running Windows 2000 or later this is no big deal. However, if you are still running Windows NT4.0 servers, these scripts and tools will fail. However all is not lost. You can download and install the WMI core for NT4.0…
More with Process and Service uptime
Like most things scripting, there’s usually more than one way to do things. I thought I had a nice solution for getting service uptime via WMI. But alas, there is an even easier way. PowerShell has a ConvertToDateTime method which will convert a WMI time to a standard date time format. $p=ps winlogon$p=get-wmiobject -query “Select…
More with Service Uptime
I knew I wasn’t totally satisfied with my recent attempt at listing service uptime. I knew there was a more elegant solution and here it is: $s=Get-WmiObject -query “Select name,processId,state from Win32_service where state=’running'”foreach ($item in $s) {$p=(Get-Process | Where {$_.id -eq $item.ProcessID}).StartTime$u=(get-date).Subtract($p)Write-Host $item.Name `t $u.Days day $u.hours hours $u.minutes minutes and $u.seconds seconds} It…