Getting registry last write time with PowerShell

All registry keys have a value associated with called the Last Write Time. This is analogous to the last modification time for a file. When ever the registry key or one if its values has been created, modified, or deleted the value is updated to the current local system time. Unfortunately, there is no Last Write Time associated with a registry value, but it can be infered from the Last Write Time of the key.

Here is a PowerShell script to read the Last Write Time for a registry key.

Usage:

Get-RegKeyLastWriteTime.ps1 <Key> <SubKey>

Continue reading

Scan IP range using ping

IP scanner for the poor ones Zwinkerndes Smiley

Just open up a cmd.exe and change the ip range..

C:\>FOR /L %x in (1,1,255) do ping -n 1 192.168.2.%x | find /I "reply" >> c:\temp\pingresult.txt

The above command uses a FOR loop to ping each device and looks for "Reply" in the output. If there is a "Reply" then the host is up.. Results will be written to C:\temp\pingresults.txt

Or the PowerShell version:

C:\> 1..255 | foreach-object { (new-object System.Net.Networkinformation.Ping).Send("192.168.2.$_") } | where-object {$_.Status -eq "success"} | select Address

Continue reading

Windows Deployment Services–adding drivers to boot.wim

Currently I’m in a project where I have do a windows 7 operating system provisioning for a customer of mine. I’ve been gone all down the way starting with NT3.51, then NT4, then Win2000, then WinXP, Vista and now Win7 provisioning. I must say, Microsoft did a good job with the latest deployment mechanism.. Logo_winlogo

Continue reading

Installing Windows to a new bootable VHD with no host OS

I love the performance gains I get by using bootable VHDs. I’ve always enjoyed using VHDs but I generally had a host OS first, then installed a bunch of VHDs that I made bootable. Recently I’ve changed all of this on my computer after a spent some time reading a post from John Papa. This leads  to more flexibility. The idea is simple: take a clean drive with no host OS and add or remove bootable VHDs as needed.

Logo_winlogo

Continue reading