Using Powershell to search for comments in gpo’s

Comments Off

It’s soon time to start blog about using PowerShell to support your Group Policy environment but here’s a start from Group Policy Team blog from MS.

You can, if you want to, search for just about everything inside a gpo and here is something to prove it from a blog post from GP Team blog.

Check it out:

Technorati Tags: , ,

Creating shortcuts with Group Policy Preferences doesn’t work


This is a quite common question about Group Policy Preferences so I’ll post it here and maybe someone will benefit from the information.

Trying to create a shortcut to a fixed drive letter using Group Policy Preference that points to a location on the network. After login there is no shortcut created and if you look in eventlog you see an error “0×80070002 The system cannot find the file specified”. If you run GPupdate /Force the shortcut is created.

This is an issue where it’s trying to create the shortcut before the drive’s are connected and Windows can’t create new shortcuts to locations not connected.


  1. Create the shortcut using UNC-path
  2. Create the drives and shortcuts using logonscript
  3. Create a scheduled task (using GPP) to run GPupdate after user logon or use logonscript to run GPupdate

Hope someone benefits from this information.

Technorati Tags: , ,

Good or bad code writing

Comments Off

Sometimes people get too much time :)

Today while walking the net I came to read this blogpost about “Good or bad code”.

Starting from today this is also how I will eval my code when writing scripts :D

New Unit of Reviewed Code Quality

Technorati Tags: , ,

Elevate rights in your Vista

1 Comment

Today I read a post in another blog (swedish) about some example codes released in a technetmag article from MS.

This example codes contains different methods on how to elevate different things.

  • Elevate Powershell straight from a catalog.
  • Elevate cmd-prompt from a catalog.
  • Elevate an MSI-package installation
  • Elevate a HTA-application

Right click and select your option.


Download the package and install the different options by right-click on the inf-files and select Install.

Download the package here.

Technorati Tags: , , ,

GPMC scripts missing in Vista

Comments Off

If you are using Vista and previously used XP and the scripts included you might be missing them in Vista as they are not included.

Microsoft released the scripts as a downloadable package for Vista which you can download here:

Technorati Tags: , , ,

GPMC Scripts

1 Comment

Group Policy Management Console (GPMC) has some example scripts which get installed when you install GPMC. These scripts are not always used so I wrote a page about the scripts which you might find useful.

Technorati Tags: ,