Another PowerTab update …

The updates move as fast as the posts ;)

Mow has released an update to PowerTab. Some cool new features, which are listed here
Aarons Snapin is now even easier to activate. Just add the following to your profile:
[quickcode:noclick]
Add-PSSnapin lerchsnapin
$TabExpansionDoubleTabLock = $false
$TabExpansionAlternateHandler = ‘intellisense’
$TabExpansionDoubleTabEnabled = $true

[/quickcode]
I do like how it picks up on custom functions I dot source in my profile. Here’s Aaron’s intellisense snapin in action with Marc’s PowerTab.
Example of Aaran Lerch’s Intellisense SnapIn

I especially like the custom tabcompletion tricks you can do:

[quickcode:noclick]
add-tabExpansion h ‘Get-help $^ -Full’
add-tabExpansion h ‘Get-help $^ -Detailed’
add-tabExpansion h ‘Get-help $^ -Examples’

Save-tabExpansion
[/quickcode]

I wonder what’s next? This also makes me think about what else could be done to PowerShell, to make it better, more friendly, easier to use.

What would you like to see improved?

Tech Talk: A server in every home?

Bill Gates has always had the belief that there should be a PC on every desk and in every home. Now it would seem that Microsoft feel there should be a server in every home too.

Later this year MS are releasing the Windows Home Server. Their aim is to have the Home Server at the heart of every home as a place for storing all your media.

Now as someone who has a 1.5TB RAID5 server at home I know exactly where they are coming from. After having 2 hard disks die on me in a 6 month period, I realized that I needed a better solution.

Forget the business data I lost, the grief I received from my better half for a bunch of irreplaceable digital photos made me determined not to have to deal with that again!

There’s a few cool features being touted in this new product, such as:

The ability to completely backup any PC around the home to the server, and on the event of a crash, you can boot from CD and recover data from the server. It even seems to utilise technology akin to Shadow Copy so that you can retrieve different versions of files. Also adding extra drives doesn’t incur the usual requirement of a new drive letter.

So now MS are positioning to have a server for all your media needs, so that’s the backend. My first though was that the primary front end for this would be MCE, but now I’m not convinced.

HP were the first major vendor to invest heavily in Microsoft’s vision for the Home Theater space, but they have recently announced their withdrawal to focus on their own media TV line.

I actually quite like MCE. It has a nice interface, and does everything I need it to but I’ve always had a few gripes about the product:
Why it’s own OS?
It’s just an application, why did MS push to have it released as Windows Media Center edition? Finally, in Vista, MS seem to have got the right idea (IMHO).

No Domain
In the version prior to 2005 I believe you could domain join the machine. MS changed this in 2005, although if the network card was detected at install time you could join at that point. There are known hacks around to change this, but the point is why did MS make this decision? Again, now resolved in Vista.

DVB-S support lacking.
It’s always appeared to be Microsoft’s position to actively not support DVB-S. This to me is the single biggest failing for adoption of the technology. I don’t want to get my MCE box talking with my Pace box. I want to replace the Pace box and just have one component that deals with my media needs! Again, there are workarounds for this, but I don’t believe MS support them.

Microsoft Vs. Sony
With all the focus MS has lately on the gaming console market and going head to head with Sony, I’m starting to feel that the Xbox 360 might be intended as the primary interface to the Home Server. This wouldn’t be the first time MS has cemented a products position against a competitor by using it’s strong position of another product(read: Windows Explorer).

This could explain why no new features were really released in Vista’s MCE. If MS are positioning the Xbox 360 and Home Server as their offering, why waste resources with MCE?

Size does count!
The next hurdle that needs to be tackled on a home server is disk space. I can get roughly 200 uncompressed DVD’s to 1TB of disk. Now the cost of capacity per GB these days is pretty cheap, so 2TB of space for your 400 movie collection is just about viable. Until you consider that a HD movie is between 15-25GB in size. To hold the same 400 movies you would need about 7TB. Right now, for home usage, that just seems a bit hardcore!

With 750GB disks available now, and 1TB disks due to hit the market shortly, maybe it’s just a matter of time! ;)

As I was writing this post, and musing on the possibilities of Microsoft’s media direction, I found this article from USA today.

It seems to me that over the next decade we are going to see a dramatic shift in the way we interact with the devices and social networks around us. Both are going to grow in new directions, offering a whole new level of connectivity. Is this just the start of Life 2.0?

Creating a GPO with GPMC and PowerShell

If you have GPMC installed then you have the ability to manage your Group Policy objects via the COM object that the software exposes.

Microsoft provide a good set of example scripts located in the Scripts folder in the GPMC install directory. There is also a pretty decent help file (CHM format). Both the help and samples are well worth a look.

Through the COM object we can perform any of the management tasks in PowerShell that can be done in VBScript or JScript etc.

Create a GPO with PowerShell - Screen shot 1
We instantiate the object, and after binding to the Directory, search for any GPO’s that match our displayName of “New GPO Test”. Receiving a count of 0 shows us that no conflict will occur. You can actually have two GPO’s with the same displayName, but this would just add a level of confusion in your environment that you just don’t need!

You might notice that I have a function dot sourced in my profile here: ConvertDNtoFQDN. This allows me to dynamically lookup data and change the format as needed.

Create a GPO with PowerShell - Screen shot 2
GPMC shows what a new GPO looks like.At this stage it is just an empty GPO, with no attributes set.

Create a GPO with PowerShell - Screen shot 3
The commands to create the object. We can also see the methods and property’s available to the GPO object. And then finally we set the displayName.

Create a GPO with PowerShell - Screen shot 4
GPMC shows our updated object with the displayName configured.

For the GPO to become useful, at a minimum, we would need to actually import settings and link it to the directory.

I am not aware of any programmatic method of actually configuring settings at the moment. What I have personally seen is people exporting backup of the GPO’s from a reference system, and then importing them into the target environment using a Migration Table to handle any domain specific references.

Below is a sample function to create a new GPO.

# Globals and Constants
$gpm = New-Object -com gpmgmt.gpm

#———————————————————————————————————-
function Create-NewGPO
#———————————————————————————————————-
{
Param (
$GPOname,
$FQDName
)
$domain = $gpm.GetDomain( $FQDName), $null, $gpm.GetConstants().UseAnyDC )
$searcher = $gpm.CreateSearchCriteria()
$searcher.Add( $gpm.GetConstants().SearchPropertyGPODisplayName, `
$gpm.GetConstants().SearchOpEquals, $GPOname )

$GPOlist = $domain.SearchGPOs( $Searcher )

If ($GPOlist.count -eq 0)
{
$GPO = $domain.CreateGPO()
$GPO.DisplayName = $GPOname
}
}
#———————————————————————————————————-
Create-NewGPO “New Test GPO” “dc=rig1, dc=testlab,dc=tld”