S3Nas PowerShell Provider (source)

I was reading Scott Hanselman’s blog this morning, when I noticed a link that looked interesting:

* PowerShell Drive Provider for Amazon S3 (Simple Storage Service) – C# Source that interfaces Amazon’s S3 to PowerShell so you can “dir” your S3 area.

I haven’t looked at Amazon’s S3 Service, but if you use it, this may be something worth taking a look at.

As always it’s nice to see the adoption of PowerShell :)

GPO Settings with PowerShell and GPExpert Scripting Toolkit

In this post we’re going to take a look at changing some basic Group Policy Settings through the GPexpert Scripting Toolkit.

The toolkit is accessed as a PowerShell Snapin, and can make changes to the following GPO branches:
GPexpert Scripting Toolkit Documentation

In this example, we’re going to make a change to the Max password age located within the Account Policies / Password Policy branch.

This is a shot of the Default Domain Policy with the default Password Policy settings. We’re going to change the Max password age setting from 24 to 7 because we like to make users lives difficult ;)
Default Domain Policy - Password Policy Settings

[Note] The blank spaces in the following pictures are where I’ve had to remove the domain name. This should be in FQDN format: MyDomain.tld
Password Policy - Max password age

A quick check in GPMC, confirms that the setting has changed.
Default Domain Policy - Password Policy Settings #2

Walking through the code, we can see how easy it is.

Add-PSSnapin GetGPOObjectPSSnapin
$gpo = Get-SDMgpobject -gpoName “gpo://example.com/Default Domain Policy” -openByName $true;

We add the snapin to the Shell so that we can use the GPO cmdlets.
The second line binds to the GPO we are going to change.

If we perform a Get-Method on the $gpo object we get an insight into some of the methods we have access to:
Displaying a Get-Method on the $gpo object

Here we create the $setting object to the setting we wish to change.

$setting = $gpo.GetObject(“Computer Configuration/Windows Settings/Security Settings/Account Policies/Password Policy/Maximum password age”);

Using the Put() method we change the attributes to what’s required. This is a similar way that certain AD attributes are modified too.

$setting.Put(“Defined”, $true);
$setting.Put(“Value”, 7);
$setting.Save();

We’ll be having a look at other settings and methods that can be changed through these cmdlets soon. In the mean time here’s the completed code snippet:

Add-PSSnapin GetGPOObjectPSSnapin

$gpo = Get-SDMgpobject -gpoName “gpo://example.com/Default Domain Policy” -openByName $true;
$setting = $gpo.GetObject(“Computer Configuration/Windows Settings/Security Settings/Account Policies/Password Policy/Maximum password age”);
$setting.Put(“Defined”, $true);
$setting.Put(“Value”, 7);
$setting.Save();

Room for Five

Room45.com

In a completely biased, non-technical post, I want to take five minutes out to promote a website.

I have 3 children, and whenever we travel as a family, it’s always challenging trying to find hotel accommodation where we are either all in the same room, or at least in close proximity with facilities that make our stay easier. If you’re in this situation, then you probably know what I’m talking about. You’ll also know that there’s not too much out there to help you plan your stay.

Now my wife (Julie) has always had a knack for putting together some excellent holidays, and we’ve always been pretty lucky with our accommodation. With this in mind Julie has been putting a forum based site together where families can share their experiences and tips for traveling with big families.

So far she’s gathered hotels from around the world that are family friendly, if you don’t fit into the 2×2 mold, and the list is growing. What it really needs at this stage is to start a community. If you have a family (large or small), and you like to travel, then head on over and share your tips and tricks, or pick up some of ours.

http://www.room45.com

Your regular scheduled programming will return tomorrow ;)