The other day I posted a VBS function for getting drive utilization. It seems only fair to give PowerShell a chance to play.
Tag: wmi
VBScript: Drive Utilization
Here’s another recent topic from the ScriptingAnswers.com forums which I thought I’d share. The forum members wanted to delete files if the drive utilization exceeded a certain threshold. Using Windows Management Instrumentation (WMI) with VBScript I came up with something like this…
Clean Temp With PowerShell
You would think that by now Windows and Windows applications would be much better about cleaning up temporary files. But no. It is amazing how many files I still see in my %TEMP% directory. I’ve always operated under the assumption that any file in %TEMP% that was created or earlier than the time I last booted up is fair game for deletion. I finally got around to using PowerShell for this management task.
TechNet Webcast: Managing Hyper-V Virtual Machines with WMI and Windows PowerShell
I don’t know how I missed this, but I hope I can find some time to squeeze it in tomorrow. I’m excited about setting up Hyper-V for all of my test and demo virtual machines. And of course, PowerShell topics are always fun. Wednesday, July 02, 2008 8:00 AM Pacific Time (US & Canada) Event […]
WinConnections Orlando ’08 Demos
I had a great time last week in Orlando speaking at WinConnections. I met a lot of terrific people, attendees and fellow speakers alike. I spoke primarily on PowerShell and how you will use it to manage your environment. As promised, I’ve put all me demos from my Wednesday sessions in a zip file.
“VBScript, WMI, and ADSI Unleashed” Samples
Download the ZIP file containing the sample scripts from this book by Don Jones.
“Managing Windows with VBScript and WMI” Samples
These are the sample scripts from the last printing of Managing Windows with VBScript and WMI, by Don Jones. Download ZIP file.
Read Remote Registry Function
Hopefully you found my last entry valuable. But I always like to take things a step further, especially when it comes to scripting and automation. So I turned my last script into a function that returns the value of a specified registry key
Remote Registry Reading the VBScript Way
Last week I blogged about using REG.EXE in a batch file to read a registry key. The batch file I provided works, but the output is limited. You could probably parse it a bit more to get it in some other format. But I’d probably turn to VBScript and WMI if I wanted better output control or if I had more complicated needs.
Got-PowerShell Revisited
Last week I showed a PowerShell function that used WMI to remotely query a machine to determine if PowerShell was installed. Well, like most things Microsoft there’s often more than one way to accomplish a task. Here is a different version of essentially the same function. This version, however, uses the .NET framework and the Microsoft.Win32.Registry class.