header image

Archive for Technology

Live Mesh Update

Posted by: | July 31, 2011 | No Comment |

Couple of points worth noting if you are going to use Live Mesh

(1) File paths longer than 269 characters (folder paths > 248) won’t sync  – shorten the path to fix

(2) PST files won’t sync – even if they are not in use


By default Mesh wants to put the target folder into your Documents area.  The way round it is:

  1. On the source machine open Live Mesh select the folder to synchronise e.g.  c:\scripts
  2. On the target machine create c:\scripts
  3. Open Live Mesh on the target machine
  4. On the folder you want to sync select sync this folder
  5. Select the folder you just created

The synchonisation now happens to the folder you want rather than your profile area.

Otherwise it works as advertised

under: Technology, Windows 7

Live Mesh

Posted by: | July 30, 2011 | No Comment |

One problem I’ve had for a while is how to keep my script library synchronised across a number of machines.  I have a laptop I use for my development work at home and I have two netbooks – at least one of which is always with my when I’m away from home.

I’ve tried using robocopy and keeping everything on a USB stick but it just doesn’t work.

Live Mesh may be the answer


I can designate folders to sync and they will sync, including subfolders, across all three machines. The sync is in both directions.

Good price point as well!

Not something to contemplate for the enterprise but a good solution for private use.

This doesn’t necessarily take away the need for a backup but it does reduce the pressure on backups as I can accept rebuilding the machine and re-installing software. Its the data I can’t afford to lose.

under: Technology, Windows 7

Dell duo tablet

Posted by: | July 21, 2011 | No Comment |

Having bought the Dell Duo a few weeks ago I’ve been giving its tires a good kick. The duo is a combination netbook and tablet. It opens and works like a conventional netbook but the screen flips round and so you can close the lid, have the screen on the outside and use it as a tablet.

As a netbook its great. 1366×768 resolution makes for a very sharp screen. Its fast enough for the applications I want to use – mainly Office & reading PDFs. Keyboard is OK and the touchpad mouse works better than my HP netbook. The lack of an Ethernet port and external video feed are irritants but they can be overcome. Performance is more than enough for what I use it for.

As a tablet it works. Windows 7 isn’t an iPad but it you want  a tablet experience that runs your business applications and is good enough then its OK. I’ve found it especially useful in meetings for scrolling through notes. As the tablet is flat on the table there isn’t the feeling of anything getting in the way that you have when everyone has a laptop open.

All in all its a good buy and a useful addition to my hardware set. I’m tending to use it as a machine for work to carry all my reference material at which it is superb.

under: Technology, Windows 7

Windows SysInternals Administrators Reference

Title: Windows SysInternals Administrators Reference

Publisher: Microsoft Press

ISBN: 978-0-7356-5672-7

The SysInternals tool set – http://technet.microsoft.com/en-us/sysinternals/default.aspx  – should be one of a Windows administrator’s best friends. You may not need them every day but when you do they will help dig you out of the hole. The toolset was created, and is still maintained by Mark Russinovich. Originally, offered as an independent set of utilities it is now owned and supplied (as a free download) by Microsoft.  

One of the difficulties, with any troubleshooting toolset, is knowing how to get the best out of the tools, especially if you are only using them now and again. The SysInternals tools can be downloaded as a complete suite or the individual tools (or group of tools) can be downloaded independently. This approach leaves the administrator possibly using, and understanding, part of the toolset because they are used regularly but completely ignorant of the rest of the tools.  Mark Russininovich, and his co-author Aaron Margois, have created the Windows SysInternals Administrators Reference to address that gap

The book is divided into three parts:

·        Part 1 starts with the SysInternals core concepts, including some historical background. Chapter 2 follows on with a look at Windows Core Concepts including administrative rights, process, threads, user and kernel mode, handles, call stacks and sessions.

·        Part 2 is where we dive into the toolset:

o   Process Explorer

o   Process Monitor

o   Autoruns

o   PsTools

o   Process and Diagnostics Utilities

o   Security Utilities

o   Active Directory Utilities

o   Desktop Utilities

o   Network and Communications utilities

o   System Information utilities

o   Miscellaneous Utilities

·        Part 3 looks at using the tools in some real life scenarios

o   Error messages

o   Hangs and sluggish performance

o   Malware

I suspect that many readers will read parts 1 and 3 for the very valuable information. Part 2 is more of a reference which will be dipped into as needed. The breadth of the SysInternals toolset means that you won’t be using all of the tools all of the time but will need the information on using the other tools. I would strongly recommend at least skimming through the chapters in part 2. You may well find something that will help solve an incipient problem. They can also suggest a course of action to help investigate potential problems.

As a very strong advocate of using PowerShell there are some occasions where the two sets of functionality overlap. The SysInternals tools will often take over where the PowerShell functionality finishes so tend to be complimentary rather then competing.

This is a book to which I think every Windows administrator/consultant needs access. I tend to carry a netbook these days with my library of scripts and utilities plus electronic copies of the important reference works I might need. A copy of the latest version of the SysInternals tools plus this book is very definitely included in that content.  

Highly recommended for all Windows administrators and consultants. Don’t leave home without it.


under: Books, Technology, Windows 7, Windows Server 2008, Windows Server 2008 R2

Oddly the methods for changing the brightness aren’t on the WmiMonitorBrightness we get a separate class with the methods. This function can be used to set the brightness

function set-monitorBrightness {
param (
$monitors = Get-WmiObject -Namespace root\wmi -Class WmiMonitorBrightnessMethods

foreach ($monitor in $monitors){
  $monitor.WmiSetBrightness($timeout, $brightness)  


Timeout is in seconds and is the time the change takes.  Set to 20 and watch a slow change

Brightness is the % brightness setting. The system will set the brightness to the nearest level available (see previous post)

under: PowerShell and WMI, Technology

The monitor brightness can be discovered like this

function get-monitorBrightness {

$monitors = Get-WmiObject -Namespace root\wmi -Class WmiMonitorBrightness

foreach ($monitor in $monitors){
  $brightness = New-Object -TypeName PSObject -Property @{
        CurrentLevel = $monitor.CurrentBrightness
        MaxLevel = $($monitor.Level | sort | select -Last 1)


The WmiMonitorBrightness class is used. The level property holds the brightness levels that can be set. A simple sort ensures we get the maximum setting

under: PowerShell and WMI, Technology

Advanced Format disks have started shipping –see http://managedux.com/2011/04/26/using-vbscript-to-check-partitions-for-advanced-format-4k-512e-sector-alignment/

These disks use a 4096 byte sector instead of 512. To get the best performance from these disks the partitions have to be aligned to a 4K boundary. This happens automatically in Windows 2008 and above. 

We need to be able to start testing partition alignment. This function uses a couple of WMI classes to do just that.

function test-4KAligned {
param (

$partitions = Get-WmiObject -Class Win32_DiskPartition -ComputerName $computer

foreach ($partition in $partitions){
  $query = "ASSOCIATORS OF {Win32_DiskPartition.DeviceID=’$($partition.DeviceID)’} WHERE AssocClass=Win32_LogicalDiskToPartition"
  $disktopart = Get-WmiObject -ComputerName $computer -Query $query
if (($partion.StartingOffset % 4096) -eq 0){
   $align = $true
else {
   $align = $false
$diskpartition = New-Object -TypeName PSObject -Property @{
   Partition = $partition.Name
   Description = $partition.Description
   AlignedTo4Kboundary = $align
   Drive = $disktopart.DeviceID
if ($drive) {
   if ($drive -eq $diskpartition.Drive){$diskpartition}
else {$diskpartition}


Tests disk partition alignment to 4k boundary

Tests disk partition alignment to 4k boundary.

Default is that all drives are tested

.PARAMETER  computer
Computer to test

Drive to test


Tests local machine

test-4kaligned -computer server01

Tests remote machine

test-4kaligned -computer server01 -drive C:

Tests C: drive on remote machine



The test is performed using modulus arithmetic on the starting offset. A result of zero means its divisible exactly by 4096 so is aligned.

under: PowerShell and WMI, Technology

The previous posts just looked at installing software updates.  We can also get driver updates through Windows updates. A simple modification to the get-updates function sets this up.

function get-drivers {
param (

$session = New-Object -ComObject Microsoft.Update.Session
$searcher = $session.CreateUpdateSearcher()

# 0 = false & 1 = true
if ($hidden){
$result = $searcher.Search("IsInstalled=0 and Type=’Driver’ and ISHidden=1" )
else {
$result = $searcher.Search("IsInstalled=0 and Type=’Driver’ and ISHidden=0" )

if ($result.Updates.Count -gt 0){
$result.Updates |
select Title, IsHidden, IsDownloaded, IsMandatory,
IsUninstallable, RebootRequired, Description
else {
Write-Host " No updates available"


Discovers available driver updates

Interrogates Windows updates for available driver updates only.
Optional parameter to display hidden updates

.PARAMETER  hidden
A switch to display the hidden updates


Displays non-hidden updates

get-drivers -hidden

Displays hidden updates



We just change the type to Driver

I haven’t modified the install function but it is similar.



  1. This only displays drivers available through Windows Update
  2. It won’t pick up new drivers from the manufacturers site
  3. I would strongly recommend not installing new drivers automatically
under: PowerShellV2, Technology


Posted by: | June 17, 2011 | No Comment |

Like many people in IT I have noticed the explosion in tablet type devices. I have looked at the straight tablet devices such as the iPad & Xoom and decided that at this time they don’t do what I need.  I can’t really work on Office documents properly and the other stuff I need in a Windows environment just isn’t available. I’m not bothered about watching video & the net is a research tool for me not a browsing area.

I have an HP netbook that does all of this, as well as run my e-readers.I’ve been very happy with so decided to try the Dell Duo.

This appears to give me the best of both worlds with a netbook factor, running Windows 7, with the plus that I can flip the screen round and use it as a tablet.

I’ll post how I’ve got on in a while

under: Technology

The rather long winded name of this class might put you off but it does show something useful

Get-WmiObject -Namespace root\wmi -Class WmiMonitorColorCharacteristics

produces these results (dropping the system properties)

Active           : True
Blue             : System.Management.ManagementBaseObject
DefaultWhite     : System.Management.ManagementBaseObject
Green            : System.Management.ManagementBaseObject
InstanceName     : DISPLAY\LGD6301\5&21e3487a&0&UID33554704_0
Red              : System.Management.ManagementBaseObject

As we have to drill down into these other objects we will create a function

function get-monitorColourCharacteristics {

$monitor = Get-WmiObject -Namespace root\wmi -Class WmiMonitorColorCharacteristics

$colours = New-Object -TypeName PSObject -Property @{
  Monitor = $monitor.InstanceName
  Active = $monitor.Active
$colours |
Add-Member -MemberType NoteProperty -Name "White XY" -Value @($monitor.DefaultWhite.X, $monitor.DefaultWhite.Y ) -PassThru |
Add-Member -MemberType NoteProperty -Name "Red XY" -Value @($monitor.Red.X, $monitor.Red.Y ) -PassThru |
Add-Member -MemberType NoteProperty -Name "Green XY" -Value @($monitor.Green.X, $monitor.Green.Y ) -PassThru |
Add-Member -MemberType NoteProperty -Name "Blue XY" -Value @($monitor.Blue.X, $monitor.Blue.Y )



The XY values are explained in these articles



under: PowerShell and WMI, Technology

Older Posts »