Wednesday, November 27, 2013

Quick JPEG Optimization to Speed Up Your Web Site

If you would like to quickly optimize the jpeg images for your web site, here's a quick method that works pretty good.

First, download jpegtran.exe, and save it to C:\

Download your image files to C:\Users\administrator\Desktop\files, or change the path in the code below to point to the root folder where you want to search for images to optimize. The script will crawl through subdirectories, so don't worry about the directory structure under the path that you specify.

Open a PowerShell prompt (you may need to "run as administrator" depending on your security settings). If your files are in a different path, or you placed jpegtran.exe edit the code below to reflect those difference. Run the code below.

$files = Get-ChildItem -Path C:\Users\administrator\Desktop\files -Recurse | where {$_.Extension -eq ".jpg"}
foreach($file in $files){
    [string]$image = $file.FullName
    [string]$cmd = "C:\jpegtran.exe -copy none -optimize $image $image"
    Invoke-Expression $cmd

The way the previous code is written, it will overwrite the existing file with the optimized one, so make a copy of them first if you want to keep the original as well.

I hope that helps. I optimized all of the JPEGs on one of my sites in a few minutes, and that includes writing the PowerShell code above.

Thursday, October 31, 2013

How to Setup Visual Studio (TFS) Test Agents in the Cloud

We ran into some issues trying to get the Visual Studio Test Agents to register and communicate with the Visual Studio Test Controller when the controller is inside our network, and the agents are in the cloud. There are some strange quirks that need to be addressed before this will work. However, following these steps you should be able to run test agents on VMs in Amazon AWS EC2, Microsoft Windows Azure, etc.

Resolution: Visual Studio Test Agent Unable to Connect to the controller. There is no agent registered...

Problem: I discovered a weird quirk with the Visual Studio Test Agents (a.k.a. TFS Test Agents). We were trying to set them up to do some load testing, and were getting the error below.

 Unable to connect to the controller on 'MyController:6901'. There is no agent with the name 'MyAgent' registered on the controller.

If you click on the "View Log" link after attempting to configure the Test Agent, you will see the follwing detailed error:

 V, 2013/10/28, 17:33:25.342, Observed that agent 'MyAgent' does not exist. Microsoft.VisualStudio.TestTools.Exceptions.EqtException: There is no agent with
the name 'MyAgent' registered on the controller.

Saturday, October 19, 2013

Resolved: WCAT: Invalid code received - Run error detected, terminating clients

When implementing WCAT for load testing for the first time I ran into the overly vague error message below.

All clients connected, Test beginning.
 Invalid code received.
  message: Run error detected, terminating clients...
  message: Terminating all instances of wcclient...
  message: Terminating all local instances of wcctl.exe...

Connection Pooling for Commerce Server 2007 and 2009

With as little as a couple hundred unique visitors on a website, we were seeing close to 300 SQL logons per second coming from Commerce Server. Every hit to SQL was creating a new connection. Luckily, this is a quick and easy fix to get Commerce Server to start reusing open connections to SQL by using connection pooling.

Take into account though, if you are using impersonation on your Commerce Server website then this is a security risk. If a one user reuses the SQL connection of a different user, they can assume the security rights of that previous user.

Saturday, September 14, 2013

Resolved: IDRAC Drive Error Either Virtual Media is detached or redirection for the selected virtual disk drive is already in use

I haven't used Dell servers much in an enterprise environment, so working with their IDRAC (Integrated Dell Remote Access Controller) controllers was a little new to me. So when I got the error message below when trying to mount an ISO, I was a little confused at first.

Drive Error Either Virtual Media is detached or Virtual Media redirection for the selected virtual disk drive is already in use.

Resolved: Error message Windows is unable to install to the selected location. Error: 0x80300001 after loading additional drivers

There is a very misleading/deceptive error that you might run into when installing various versions of the Windows operating system. It typically happens when you load additional drivers for raid controllers, fiber cards, SCSI controllers, etc. That error is:

Error: "Windows is unable to install to the selected location. Error: 0x80300001."

Wednesday, September 4, 2013

How to Turn On Debug Logging for Group Policy

When you are troubleshooting group policy issues, it's helpful to turn on some additional logging. Unfortunately, it's not just a simple switch you turn on. You have to know what you are doing to get those logs.

Wednesday, July 24, 2013

Find a Cure for AIDS With Your Android Smart Phone

Ever wish you could do more for humanity? Think AIDS sucks? Ever feel like you’re not getting everything out of your smart phone that you could? Thanks to World Community Grid, now your Android smart phone can join in the fight against AIDS by helping to actively search for a cure to AIDS using grid computing technology.

Enterprise Level Management of Apple Mac OS X Devices

Apple products seemingly are not designed with enterprise IT in mind. They do not facilitate centralized management natively, and it’s a pain point for many IT shops. Never-the-less, companies are still being infiltrated with these devices as bring-your-own-device (BYOD) concepts gain ground.

Sunday, June 30, 2013

Resolution: Error during encryption or decryption. System error code 997 in SharePoint

I was recently ran into an issue in SharePoint where my Central Administration web app disappeared. When I tried to redeploy Central Administration, I was confronted with the error below.

An exception of type System.ArgumentException was thrown.  Additional exception information: Error during encryption or decryption. System error code 997.

Everything I saw online said the only option was to create a new config database. Personally, I thought that seemed a bit extreme. Well, I found a better option that worked for me, and will probably work for you too.

Monday, May 27, 2013

How To Block Facebook Game Invites

I'm always seeing posts on Facebook from frustrated users who are asking their friends to not send them game invites anymore. Facebook doesn't make it real obvious, but you can block those annoying game invites.

Tuesday, April 30, 2013

How To Remove The Root Hints from Windows DNS

I ran into a problem while I was locking down a Windows DNS server where I would remove the root hints, but they would keep coming back. I first thought it was because of the "root hints" updates that Microsoft releases every so often. In reality, it was because the root entries were listed in the %windir%\system32\dns\cache.dns file. If you comment out those root hints with a semicolon (including the lines that start with a period (.)), then remove the root hints from your DNS server properties in the DNS Manager MMC snap-in. They should stay away. An example of the cache.dns file after it's been commented out is below.

Sunday, April 14, 2013

Faulting application gpresult.exe, version 5.2.3790.3959, faulting module gpresult.exe, version 5.2.3790.3959, fault address 0x000000000001323c.

There is a problem with gpresult on 64 bit servers that can cause it to crash with the following errors.

Event Type:        Error
Event Source:    Application Error
Event Category:                (100)
Event ID:              1000
Date:                     4/11/2013
Time:                     3:01:51 PM
User:                     N/A
Computer:          SERVER
Faulting application gpresult.exe, version 5.2.3790.3959, faulting module gpresult.exe, version 5.2.3790.3959, fault address 0x000000000001323c.

For more information, see Help and Support Center at
0000: 41 70 70 6c 69 63 61 74   Applicat
0008: 69 6f 6e 20 46 61 69 6c   ion Fail
0010: 75 72 65 20 20 67 70 72   ure  gpr
0018: 65 73 75 6c 74 2e 65 78   esult.ex
0020: 65 20 35 2e 32 2e 33 37   e 5.2.37
0028: 39 30 2e 33 39 35 39 20   90.3959 
0030: 69 6e 20 67 70 72 65 73   in gpres
0038: 75 6c 74 2e 65 78 65 20   ult.exe 
0040: 35 2e 32 2e 33 37 39 30   5.2.3790
0048: 2e 33 39 35 39 20 61 74   .3959 at
0050: 20 6f 66 66 73 65 74 20    offset 
0058: 30 30 30 30 30 30 30 30   00000000
0060: 30 30 30 31 33 32 33 63   0001323c

How to Disable Credential Caching in ADFS

If you have session problems in ADFS, you may need to disable Local Security Authority (LSA) credential caching on the AD FS server temporarily. This can affect any application that uses claims based authentication including SharePoint, CRM, Office 365, etc. To do this, you need to:

404 Error for Isolated Users in Dynamics CRM

I had an issue recently where one user was getting a 404 error when trying to log into CRM. While troubleshooting this issues I tried everything I could think of, including disabling Local Security Authority (LSA) credential caching on the ADFS server, recreating the user's Active Directory account, disabled/re-enabled her CRM account, purged her kerberos tickets, deleted her cookies, killed her ADFS sessions, rebooted servers, reset passwords, checked her security roles, etc. After trying every perceivable resolution, this is what I had to do to fix the issue.

Friday, March 29, 2013

Resolution: Errors After Installing Update Rollup for Dynamics CRM 2011

After installing an update rollup for Dynamics CRM 2011 ( I was installing UR12, but others have gotten the same error with outher URs), I started getting this error.

Log Name: Application Source: ASP.NET 4.0.30319.0 Date: 3/28/2013 8:40:04 AM Event ID: 1309 Task Category: Web Event Level: Warning Keywords: Classic User: N/A Computer: crm_server.domain.local Description: Event code: 3005 Event message: An unhandled exception has occurred. Event time: 3/28/2013 8:40:04 AM Event time (UTC): 3/28/2013 1:40:04 PM Event ID: 857c1ec3a88c43799878637451e1b3a7 Event sequence: 36389 Event occurrence: 23 Event detail code: 0 Application information: Application domain: /LM/W3SVC/1/ROOT-1-140088322863478416 Trust level: Full Application Virtual Path: / Application Path: C:\Program Files\Microsoft Dynamics CRM\CRMWeb\ Machine name: CRM_SERVER Process information: Process ID: 3508 Process name: w3wp.exe Account name: DOMAIN\service_account Exception information: Exception type: CrmException Exception message: Attribute objecttypecode on Entity PrincipalObjectAccessReadSnapshot is of type picklist but has Child Attributes Count 0 at

Wednesday, March 27, 2013

Filter Security Event Logs by User in Windows 2008 & Windows 7

If you are like me, you probably miss being able to easily filter your security event logs by a specific user like we did in previous versions of Microsoft Windows. Well, it is still possible in Windows 2008 and Windows 7. You just need to use the XML filter option. When you are in the security event logs, click on "Filter Current Log..." from the actions pane. Click the XML tab of the window that opens, and check the box next to "Edit query manually".

Tuesday, March 19, 2013

Dynamics CRM: Authentication is Required - Timing Out and Prompting for Credentials

If you are running Dynamics CRM 4.0 and 2011 with claims based authentication, by default you get a prompt saying "Authentication is Required" after 20 minutes. If you want to extend this timeout, you need to make some changes to the relying party trust in Active Directory Federation Services (ADFS).

List all of the Microsoft Hotfixes Installed on a System

If you need to list all of the Microsoft hotfixes/patches that are installed on a system, you can run the command below from a command prompt. Add/Remove Programs does not list them all.

$10,000 Worth of Microsoft Training Videos For Free

Microsoft puts on a huge training event every once per year, per continent called TechEd. This event is great! It offers hundreds of different focused training sessions every year that you can choose from to further your education. However, the registration fee alone is over $2,000 (standard pricing), then you have travel and hotel expenses on top of that. Because of that, this is not something that everybody can afford to attend.

If you cannot go to Teched, you can still watch the sessions from previous years for free online. These videos won't give you the full conference experience, but they are a great learning resource that's available for free.

Wednesday, March 6, 2013

Fix Event ID# 7043 Load control template file /_controltemplates/TaxonomyPicker.ascx failed: Could not load type

This is an error that's a little misleading. At first it might seem that the file is missing or that there is a permissions issue, but that's not the case. The problem is that there is a bad charater in the template file.

Log Name:      Application
Source:        Microsoft-SharePoint Products-SharePoint Foundation
Date:          3/6/2013 1:07:44 PM
Event ID:      7043
Task Category: Web Controls
Level:         Error
User:          DOMAIN\farm-admin
Computer:      sharepoint-server.domain.local


Load control template file /_controltemplates/TaxonomyPicker.ascx failed: Could not load type 'Microsoft.SharePoint.Portal.WebControls.TaxonomyPicker' from assembly 'Microsoft.SharePoint.Portal, Version=, Culture=neutral, PublicKeyToken=71e4bce131e9439c'.

Fix Sharepoint/Powershell Error: The Farm is Unavailable

Below is an error that you can get in PowerShell or via STSADM for SharePoint

PS C:\> Get-SPServiceApplicationProxy
Get-SPServiceApplicationProxy : The farm is unavailable.
At line:1 char:30
+ Get-SPServiceApplicationProxy <<<<
    + CategoryInfo          : ResourceUnavailable: (Microsoft.Share...pplicationProxy:SPCmdletGetServiceApplicationProxy) [Get-SPServiceApplicationProxy], InvalidOperationException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletGetServiceApplicationProxy

Monday, March 4, 2013

The Distributed Transaction Coordinator service terminated with service-specific error 3221229584 (0xC0001010).

If you get the following error in the system event logs while trying to start the Distributed Transaction Coordinator service, we can help.

Event Type: Error
Event Source: Service Control Manager
Event Category: None
Event ID: 7024
Description: The Distributed Transaction Coordinator service terminated with service-specific error 3221229584 (0xC0001010).

The IP Address You Have Entered for this Network Adapter is Already Assigned to Another Adapter

If you have ever replace and NIC card, either virtual or physical, and used the same static IP address as the old card had, you probably recognise the error below.

The IP address XXX.XXX.XXX.XXX you have entered for this network adapter is already assigned to another adapter <Name of adapter>. <Name of adapter> is hidden from the network and Dial-up Connections folder because it is not physically in the computer or is a legacy adapter that is not working. If the same address is assigned to both adapters and they become active, only one of them will use this address. This may result in incorrect system configuration.

Do you want to enter a different IP address for this adapter in the list of IP addresses in the advanced dialog box?

VMWare Console Window Blank

There's an issue with Data Execution Prevention (DEP) in Windows that causes you to get a black empty screen , or a white blank screen while trying to connect to a VMWare console using the VSphere client, or the Virtual Infrastructure Client (VIC). You might also be presented with one of the following errors

  • Unable to get the window handle for the 'AxQuickMksAxCtl' control. Windowless ActiveX controls are not supported.
  • Exception has been thrown by the target of an invocation

Thursday, February 21, 2013

How to Delegate Rights to Modify SPNs in Active Directory

With Kerberos taking over as the preferred authentication protocol, system administrators need to be able to modify the SPN for their service accounts and computer objects in Active Directory. And you don't want to make all of your system administrators domain admins. To delegate this right, you can run the command below on your domain controller.

You have not entered a valid product key or the key is incorrect

The following two errors show up for Microsoft Office 2007 and 2003 users for a couple of reasons.

Error #1
The key is incorrect. Verify that you have the correct key, and then retype it.

Error #2
You have not entered a valid Product Key. Please check the number located on the sticker on the back of the CD case or on your Certificate of Authenticity.

Sunday, February 17, 2013

Forceful Demotion of a Dead Domain Controller

If one of your domain controllers dies on you, then you cannot gracefully demote it. So, when this happens there are a few things that you need to do to remove it from the domain and cleanup the mess that this failure created.

The first step is to jump on one of your remaining domain controllers that's running Windows 2003 SP1 or newer.

Monday, February 11, 2013

How to Configure Windows Event Logs as SNMP Traps

There are a lot of different monitoring suites out there that monitor servers by using SNMP traps. If you want to be alerted when a specific error or warning occurs in any of your event logs, you need to configure those events to send an SNMP trap.

To do this, you need to launch %windir%\system32\evntwin.exe to start configuring them. That opens up a window like this.

Thursday, January 31, 2013

SharePoint Navigation Limited to 50 Items

There is a limit set in SharePoint by default which only allows fifty links to show up in the navigation. If you add pages and/or subsites beyond the limit of 50, they stop showing up in the navigation.

The right thing to do would be to re-evaluate your SharePoint site structure at this point. Chances are though, that you will need a more immediate work around to get you past this issue in the meantime.

The limit is set in the PortalSiteMapProvider class in SharePoint. Microsoft’s explanation behind this limit is that “Showing a large number of items in the navigation menu is not useful and can have a negative impact on performance”.

Wednesday, January 30, 2013

Powershell Script to Delete Out Temporary Internet Files

If you have a lot of user profiles on a box, the user profiles can start to take up a lot of disk space. This is especially so on a Citrix or terminal services server, but can affect any system where more than a few people logon. I wrote a quick powershell script that can be scheduled to clean these out.

IIS Log Management Script in Powershell

IIS logs on a busy webserver can use up a lot of disk space. I wrote this little powershell script that I schedule to run on all of my web servers. It goes in and deletes out any IIS logs older than 1 year. Then it compresses any IIS logs that are left which are older than 1 day and are not already compressed. You can change the length of time for these to suit your needs by changeing the numbers in the "AddDays(-123)" parts of the script. Just make sure it's a negative number, or else you won't have any logs left.

Saturday, January 19, 2013

Configuring a CRM Email Router to Run Under a Domain Service Account

If you tried running the CRM 2011 email router under a domain service account, you probably ran into some issues. Please, do not take the easy way out and make the account an administrator, you can give it the rights it needs without going to that extent.

The first thing it needs is the "log on as service" user right, but it should get that granted when you configure the service to run under your service account in services.msc. So, I'm going to assume that's already taken care of.

Friday, January 18, 2013

MSCRMEmail: Metadata contains a reference that cannot be resolved

Below is an error that can appear when you are running the CRM email router on the same server as your CRM web services. I experienced it after adding a second web site on the CRM server to run a portal that is back-ended by CRM. The error was also accompanied by high CPU and memory usage as well.

Sunday, January 13, 2013

Tips on How to Free Disk Space on Your PC or Server

I have noticed a lot of people on the internet having issues with their hard drives filling up "mysteriously" and they are not sure what to do to reclaim some of that disk space. I've already written a handful of articles that touch on various consumers of disk space, so I am going to bring all of them together in one place for your convenience. I will keep adding to this page as I write more articles that are along these same lines.

Friday, January 11, 2013

How to Configure Your Page File to Save Disk Space

Written by Greg Kjono

There are a couple of hidden files that typically use up a lot of disk space, especially in systems that have large amounts of RAM. These are the pagefile.sys and hiberfil.sys. Hiberfil.sys can be deleted if you don't use the hibernation feature. Instructions on how to do that are available at

I don't recommend completely removing the pagefile, especially on desktops and laptops, however. You can configure them to not use so much disk space though. By default they are set to "system managed" and are probably close in size to the amount of memory you have in your PC. Chances are that you aren't actually using most of that space in the page file, and that your computer is just allocating that space in case it needs it in the future.

Wednesday, January 9, 2013

How to associate a second YouTube channel with a Google Adsense account

If you created a second YouTube channel and you are want to link it to your original adsense account, then you are in the right place. It's not a hard thing to do. It's just that some of the peices are kind of hidden on YouTube's site.

I am going to assume that you have already created a second YouTube channel and that you want to link it to your adsense account. First, log into the YouTube channel that you want to tie to your adsense account.

Error! Windows - No Disk: Exception Processing Message c0000013 Parameters 75a851d8 979a26dc 75a851d8 75a851d8

This is one of those errors that doesn't really give you any information to go on. All you really get is this popup message that say Windows - No Disk: Exception Processing Message c0000013 Parameters 75a851d8 979a26dc 75a851d8 75a851d8.

Error! Windows - No Disk: Exception Processing Message c0000013 Parameters 75a851d8 979a26dc 75a851d8 75a851d8

Sunday, January 6, 2013

Disable Weak SSL Ciphers and Protocols in Windows, IIS, ISA, TMG & UAG

You should disable the weak SSL ciphers and protocols that are riddled with vulnerabilities and security flaws on any Microsoft Windows server running IIS, ISA, TMG and UAG.

The resolution for this weakness is rather simple. Merge the data below into your registry and reboot. That's it.

The easiest way to do that is to copy the text from the white box below, past it into notepad and save the file with a ".reg" extension (make sure to change the "Save as type" to "All Files". Backup your registry, then right-click the file and select "merge". Click "Yes" and you are done. If you are running UAC, you need to click "yes" twice.

Thursday, January 3, 2013

Phantom space used in Windows 7, Windows Server 2008, Windows Server 2008 R2, and Windows Vista

A common issue that has baffled a lot of administrators is where a large amount of disk space is showed as in use, but they can’t find the files that are using it. For example, ff you go to the root of the C: drive, select all of the files, right-click, and click properties. The amount of space shown as used on that properties window isn’t nearly what it should be if you deduct it from the size of the drive and compare your results to the free space that Windows explorer, or my computer shows.

There are a couple things that most often contribute to this. The first is a bloated, oversized $TOPS file. You can set your system to specify that the Transaction Resource Manager will clean the transactional metadata on the next mount, or reboot.

How to delete hiberfil.sys on Windows 2008/Vista/Windows 7

In Windows 2008, 2008 R2, Vista and Window 7, disabling hibernation via Power Options in the control panel doesn't get rid of the hiberfil.sys file. This file is usually equal to the amount of memory your system has, so it eats up a lot of disk space. This is  especially true if you have a lot of memory which is common on servers, or a small amount of disk which is common on virtual machines. To get rid of this file and free disk space, just run the following command from an elevated, or administrative command prompt.

Wednesday, January 2, 2013

Symantec Endpoint Protection 12.1 clients are holding onto multiple virus definitions, using a lot of disk space

There is a known issue with Symantec Endpoint Protection 12.1 clients where it does not delete the old virus definition files. These definition files build up and start consuming gigs and gigs of disk space.

They do have a fix for it now, which involves upgrading to Update Rollup 2 (UR2). Unfortunately,  you might not be able to upgrade right away. As a workaround, I wrote the powershell script below that will cleanup the old definition files. I schedule this to run daily.