Category Archives: Microsoft

Active Directory Script to Shutdown Computers per OU


If you need to shutdown computers per OU in Active Directory here is one way of doing it:

The only change you have to make for this script to work is to provide an LDAP string/path to the OU in AD where you’d like to shut the PCs.

In my company we had to come up with a solution to comply with the “green” policy enforced upon us. Initially I have tried the built-in shutdown command and feeding in computer names using Excel and CONCATENATE function. Issue with that approach was that my script was trying to reach out to each machine to check if its on the network and pingable taking too long to complete. Script above doesn’t have the same issues – it literally fires up shutdown request simultaneously to all machines on the specified OU – much quicker and definitely more effective!

If you guys have other ideas or have other solutions please let me know in comments below!

Active Directory “computer name contains” search string


You just have to love the simple things in this world that are not so obvious at first thought…

In AD if you try to search for computer name and would like to be slightly more specific you have a problem. Here is the default choice:

The rather obvious choice would include “computer name contains” but sadly the option is not there! Solution? Simple – use LDAP search string instead! In ADUC define new query with custom search for:


where 0112 is what you’re looking for (or computer name contains)

Continue reading

How to import .nk2 file from earlier versions into Outlook 2010 suggested contacts


Here are the steps you need to perform in order to import .nk2 file from Outlook 2007 and earlier versions into Outlook 2010 and Exchange suggested contact list:

1] Copy the .nk2 file to:


Please Note: .nk2 file name must match your current Outlook profile name. If Outlook profile has been left at the default setting it will be called simply “Outlook” therefore .nk2 file must be named as Outlook.nk2

To check your profile name go to: Start / Control Panel / Mail / Show Profiles. If your profile is not named Outlook please rename the .nk2 file accordingly.

2] Go to Start / Run and type cmd.exe to open a new command prompt window.

3] For 32bit OS and 32 bit version of Ooutlook type:

%ProgramFiles%\Microsoft Office\Office14\Outlook.exe /importnk2

If you happen to be running 64bit OS type:

%ProgramFiles(x86)%\Microsoft Office\Office14\Outlook.exe /importnk2

Hit enter key, Outlook will open and you should have your contacts all imported!

Please Note: Once the import happens .nk2 will get renamed to .nk2.old and you need to rename it back to .nk2 if you need re-importing.

Download links for MDT 2010 Update 1….

MDT 2010 Update 1 Logo

If you’re looking for MDT 2010 Update 1 then Microsoft STILL provides download links for it:

All other links have been replaced with MDT 2012 so grab it while you can!

One thing to keep in mind here is that official Microsoft support for MDT 2010 Update 1 ends in April 2013.


EDIT – 3rd of December 2013

Looks like Microsoft have taken the links down – I have uploaded both x86 and x64 versions here:


Office 2010 Pro PLUS – Remove “Shared Folder Synchronization” from Explorer Context Menu


Microsoft Office 2010 Pro and Pro PLUS adds handy (?) option to Windows Explorer context menu called “Shared Folder Synchronization”. This also appears in Standard Buttons toolbar in each Explorer window:

If you don’t use/like Microsoft SharePoint Workspace aka Groove (in Microsoft Office 2007) there is very little purpose for this addition to exist – here is how to remove it:

Either rename or delete the following registry key:


So rename would look like this:


Deletion can be completed by running this command:

REG DELETE HKEY_CLASSES_ROOT\CLSID\{6C467336-8281-4E60-8204-430CED96822D} /f

Also, third available option is to un-register GROOVEEX.DLL library file, command:


OCSetup/DISM, Component Name List…


There are two ways of installing components in Windows (scripted ways of course) i.e. you can use OCSetup or DISM Tool.

In both cases you have to supply component name like:

start /w ocsetup <windows_component_name>
dism /online /enable-feature:<windows_component_name>

In my case I had to add Tablet PC Components but had to clue what the component name was. These names are technical names and not what Windows Control Panel displays in “Turn Windows Features On or Off”. So how do I get the correct name for components I need to install? Its a rather simple task really, in elevated command  prompt type:

dism /online /get-features

If you would like to narrow it down a bit (list is quite long) you can pipe the output and look for “Tablet” lets say:

dism /online /get-features | find “Tablet”

To install it simply take TabletPCOC name and insert into either of the commands above instead of <windows_component_name>

Orca – MSI Database Editor Tool


In case someone is looking for just the .msi as opposed the rest of the junk that Microsoft provides – here it is!

Download Orca.msi

Orca is kind of forgotten now, but still incredibly powerful, .msi database editor. If you ever had/will have something to do with application(s) delivery/deployment its simply a must have tool.

Each time I have to deploy an application, its no doubt, I will have to use Orca to some extend.

Remember Adobe Reader X and that nasty shortcut it creates on the desktop for all users? I bet you do. The only way to remove it is to hack the .msi database and drop “certain” record from “certain” table – job done!

Besides all that, ORCA is One Really Cool Application! 🙂