I always like reading about the “back story” in movies. You know, the stuff that happened before the movie started or stuff that helps fill out the story. Companies and people can also have a back story. Maybe I’ll reveal some of mine someday. In the mean time, I came across SAPIEN Technologies back story…
PWDMan Update
I’ve updated my Password Manager utility. If you haven’t seen this, I wrote about it in my Mr. Roboto column. This tool will scan computers and report the age of the local administrator password. If you’ve renamed the account you can change the account name to check. When finished, you’ll have a nice report showing…
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…
Get Latest File
I was helping out in the MSN Groups scripting forum recently. The admin needed to find the latest file or most recently modified file in a folder. That sounded reasonable to me so I put together a function and short script that uses it. I thought I’d share it here: ‘GetLatestFile.vbsstrDir=”S:”WScript.Echo “The newest file is…
SAPIEN Scripting Makeover Contest
In case you missed it, or perhaps you’ve let it slide, you really need to take a look at the Scripting Makeover contest that SAPIEN Technologies is running. The contest winner gets over $20,000 in automation related products and services. Essentially, you submit your company or organization (there are some rules) and provide some adminisitrative…
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…
iTunes Lyrics Viewer HTA
I’ve been toying around with the iTunes COM object (iTunes.Application) which gives you some pretty handy control over the iTunes application. I was particularly interested in having something display song lyrics so I developed an HTA that displays album art, artist and song information and lyrics. The tool will refresh whenever a new song is…
Updated PowerShell Help Utility
SAPIEN Technologies has released a new version of their free PowerShellHelp tool. This tool gets all the help information from your PowerShell installation and presents it in a nice GUI that now looks like Office 2007. The screen shot doesn’t really do it justice, but you get the idea. Not only will you get alias…
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…
PowerShell Process Uptime
Not too long ago, I wrote an MCPMag Tip Sheet column on using the pipeline in PowerShell. I showed how you could get the start time of a specified service: $svcname=Read-Host “Enter a service name” ; get-process | where {$_.id -eq (get-wmiobject win32_service | where {$_.name -eq $svcname}).ProcessID} | select -property StartTime We can take…
More Fun with Get-Content
A few followups on my recent post about Get-Content. First, you can also use the CAT alias if you’re used to the Unix world, or TYPE in place of get-content. The Get-Content cmdlet does have a parameter called -totalcount that will return the specified number of lines from the beginning of the file: cat c:\boot.ini…
PowerShell Get Content
One slick trick you can do in PowerShell with text files that’s difficult to accomplish without extra tools is to display sections of text files without showing the entire file. When you use the Get-Content cmdlet, the resulting content is treated as an array of strings. This means you can simply specify the line you…
PowerShell TFM back in stock
I’m a little late in posting this, but Amazon.com now has copies of Windows Powershell: TFM back in stock. I know SAPIEN Press is also working on getting the title available through Barnes & Noble and maybe a few other places. When I know of other places, I’ll be sure to let you know. I…
Lost in the Amazon
Still waiting for Amazon to realize they need to order more copies of Windows PowerShell:TFM. Now they state that the book is not available, where it use to say unavailable. What difference does that make? You still can’t order the book. The latest I’ve heard is that Amazon has not re-order and will not until…
Save on Advanced VBScript
Bookpool is having a huge sale on Microsoft Press books, up to 50% off. If you’ve been putting off getting a copy of Advanced VBScript for Microsoft Windows Administrators, it probably won’t get better than this. Bookpool has this title at 45% off. Plus I think they are offering free shipping on orders over $40….