PowerShell v2 CTP3 is here!

An early Christmas present is given by the Windows PowerShell team; PowerShell Community Technology Preview 3 of Windows PowerShell version 2.

You can read the announcement by the Program Manager here, and get the bits here.
As stated in the release notes you must first uninstall v1 to be able to install v2 CTP3. Also you would need the Win RM 2.0 CTP 3 for remoting, and .NET 3.5 SP1 for the graphical interface (ISE – Integrated Scripting Environment). Also, you can find a good summary of breaking changes in this blogpost on the Nivot Ink blog.

Regarding PowerGUI the latest build is in general compatible with the new CTP 3 of PowerShell, but there are a few issues which will be corrected in the next version which ships very soon. You can read more about this in Dmitrys blogpost.

With v2 there is a new feature called Advanced Functions which seems really nice, see Jeffrey Snovers post regarding this here.

Microsoft Deployment Toolkit 2008

Today Ive walked through the TechNet Virtual Lab: Introduction to Microsoft Deployment Toolkit 2008, which was a good introduction to the MDT.

I would recommend all of you who are working with client (and server) deployment to have a look at MDT 2008 as its a very good tool to deploy clients (and upgrade existing ones).

More labcasts regarding deployment can be found here.
The MDT 2008 homepage can be found here, and the download page for the newest version here.

MDT combine existing Microsoft-products such as Windows Deployment Services for imaging and User State Migration Tool for migrating user profiles when reinstalling or upgrading a client.

I would also recommend you to check out the MS Deployment Toolkit Blog as well as The Deployment Guys` Blog.

Active Directory Snapshots in Windows Server 2008

Snapshots is a new feature in Windows Server 2008 Active Directory Domain Services.
It allows you to take live snapshots of the Active Directory Database (ntds.dit).

Click on the image to see my example usage:


The snapshot can also be scheduled to be run i.e. on a daily basis by putting this in a cmd-file and scheduling it to run daily:
ntdsutil snapshot “activate instance ntds” create quit quit

As you can see on the image above you can list all snapshot by typing “list all” within the snapshot-context in ntdsutil.
Then you can type “Mount {GUID}” to mount the snapshot in the filesystem.

A utility called dsamain allows us to publish the mounted snapshot as an LDAP-server, which then can be access by i.e. ldp.exe


In this example I`ve used a great tool called Directory Service Comparison Tool made by Fredrik Lindström, you can see more info regarding the tool here.

Then I connect to the LDAP-server instance I set up with dsamain:


Now we can see modified, added and deleted objects (the snapshot is being compared to the live Active Directory database):


System Center Virtual Machine Manager 2008 and PowerShell

I`ve been playing around with System Center VMM 2008 lately, and I really like “View Script”-button:


Clicking on the button you get a text-file containing the script which is being run when you press “Finish”. (Almost the same functionality in Exchange 2007, the difference is that you must press Ctrl + C rather than a button to copy the script/command being run in the Exchange Management Console).

Sample textfile-output:

Now you can save it as a ps1-file and tweak as wanted. This makes it really easy to get started automating tasks in SCVMM.

Btw, SC VMM 2008 is a really great product, making it possible to manage Virtual Server 2005, Hyper-V and VMWare ESX :)

What is going on

Ive been quite busy the last couple of months studying for "MCITP: Enterprise Administrator", and therefore my blog isnt updated for a while. Now Im finally done with that and can use more time on PowerShell :)

Ive just started reading the “Windows PowerShell Cookbook” by Lee Holmes, and it seems really good. Ill get back to it when Ive read through it.

I just discovered the “Videos and Flash Demos” in the PowerGUI Documentation, and would recommend you to have a look at this if you want to learn about PowerShell and PowerGUI.