Thursday, February 27, 2014

Updated: Starting Google Earth on Citrix XenDesktop 5.6 virtual desktop prompts the message: ‘DirectX’ mode not supported

First off, I apologize for not taking the time to update my previous post:

Starting Google Earth on Citrix XenDesktop 5.6 virtual desktop prompts the message: ‘DirectX’ mode not supported
http://terenceluk.blogspot.com/2013/04/starting-google-earth-on-citrix.html

… which I wrote last April in 2013 about starting Google Earth in a Citrix XenDesktop 5.6 virtual desktop in Direct X mode and receiving the following message:

‘DirectX’ mode not supported

image

… because I’ve received quite a few questions about this post where some users were unclear about how to install the Google Earth Optimization pack as defined here:

HDX Optimization Pack for Google Earth
http://support.citrix.com/proddocs/topic/xendesktop-56fp1/hdx-opt-pack-for-google-earth.html

To make a long story short, the instructions provided in my previous post works when you copy the d3d9.dll file bundled from the x64 folder in the Google Optimization pack zip file supplied by Citrix but the only way to get it to work was to copy the file to C:\Windows\SysWOW64 folder as well.

What I noticed a few months after writing that post was that even if you’re installing this on a Windows 7 64-bit virtual desktop, you can actually copy the d3d9.dll file bundled from the x86 folder to only the folders:

%ProgramFiles(x86)%\Google\Google Earth\client\alchemy\ogles20

%ProgramFiles(x86)%\Google\Google Earth\plugin\alchemy\ogles20

%ProgramFiles%\Google\Google Earth\client

%ProgramFiles%\Google\Google Earth\plugin

… as outlined in the Citrix KB to get Google Earth 7 to start in Direct X mode.  This obviously is the better route because it does not force you to replace the protected file in the C:\Windows\SysWOW64 file which may cause issues further down the road.

I apologize for not writing this post earlier and hope this will help anyone out there looking for an explanation as to why simply copying the d3d9.dll file bundled from the x64 folder in the Google Optimization pack zip file did not work.

Wednesday, February 26, 2014

Unable to install Citrix XenDesktop 5.6 VDA agent update or uninstall the VDA agent

I ran into an interesting issue today when I was working on a user’s dedicated desktop.  The issue was related to the Google Optimization pack which began watermarking Google Chrome with the SwiftShader logo.  I have all the screenshots captured to write a detailed blog post to fix that at a later time but the short and brief explanation of the fix is to replaced the d3d9.dll file bundled with the Google Optimization pack with the original one supplied by Windows then replace it again with the optimization pack dll file.  Shortly after I fixed the SwiftShader watermark issue, I thought it would be a good opportunity to upgrade the desktop’s VDA agent from 5.6.300 to 5.6.400 so I went ahead to run the installer but notice that it would fail with the following error:

Citrix Virtual Desktop Agent Core Services – x64

There is a problem with this Windows Installer package.
A DLL required for this install to complete could not be run.  Contact your support personnel or package vendor.

image

Not aware that this was related to the d3d9.dll file, I figure I’d try uninstall the 5.6.300 core services update from the Programs and Features menu and noticed that I would receive the same error message causing the uninstall to rollback and terminate.  From here, I went on to try and uninstall the Citrix 5.6 VDA agent but it would also fail with the following log:

************************************* Start of new log ***********************************
Date: Wednesday, February 26, 2014
Application version 5.6.0.21
Running from C:\Program Files\Citrix\XenDesktopVdaSetup\MetaInstallerCore.dll
18:14:48.3368 : XenDesktopSetup:Checking for Virtual Machine environment and caching the results...
18:14:48.5108 : XenDesktopSetup:IsVirtualMachine: Checking for Virtual Machine...
18:14:49.0408 : XenDesktopSetup:IsVirtualMachine: SMBIOS Information
18:14:49.0418 : XenDesktopSetup:  Name: VMware Virtual Platform
18:14:49.0428 : XenDesktopSetup:  Vendor: VMware, Inc.
18:14:49.0428 : XenDesktopSetup:Vendor Info: Unknown
18:14:49.0458 : XenDesktopSetup:IsVirtualMachine: Virtual Machine Detected.
18:14:49.0468 : XenDesktopSetup:IsVirtualMachine: Checking for Virtual Machine...
18:14:49.1039 : XenDesktopSetup:IsVirtualMachine: SMBIOS Information
18:14:49.1039 : XenDesktopSetup:  Name: VMware Virtual Platform
18:14:49.1049 : XenDesktopSetup:  Vendor: VMware, Inc.
18:14:49.1049 : XenDesktopSetup:Vendor Info: VMWare
18:14:49.1079 : XenDesktopSetup:IsVirtualMachine: Virtual Machine Detected.
18:14:49.2349 : XenDesktopSetup:Product with upgrade code {0a4bbeef-2958-44c8-9ef7-4c2c0adc3d6e} is not installed.
18:14:49.2409 : XenDesktopSetup:Service pack: 1
18:14:49.2799 : XenDesktopSetup:This is a supported VDA OS.'
18:14:51.7031 : XenDesktopSetup:Found installed MSI product upgrade code'{C5CA087F-BA72-41A1-A469-E137ECB54D2E}', product code {569E8A6E-14CC-47C2-ABCE-489EB5B1251C}, version '5.6.300'
18:14:51.7281 : XenDesktopSetup:Product with upgrade code {30411FC2-9D05-43FE-9D85-A0F3BDDBD306} is not installed.
18:14:51.7311 : XenDesktopSetup:Product with upgrade code {4A80D587-C1F4-4B5B-874C-398EDA0D0EE7} is not installed.
18:14:51.7341 : XenDesktopSetup:Product with upgrade code {9F62F192-E0FB-4615-A686-BD79D40E8970} is not installed.
18:14:51.7441 : XenDesktopSetup:CheckRegKeyExists: RegKey Software\WoW6432Node\Citrix\PluginPackages\XenAppSuite\ICA_Client: Opened Registry Key successfully.
18:14:51.7451 : XenDesktopSetup:Product with upgrade code {C6F601FC-380A-4399-B1E9-7B881F70D1D2} is not installed.
18:14:51.7561 : XenDesktopSetup:Current User Preferences follows state: after-process-cmdline
18:14:51.7761 : XenDesktopSetup:NoWinRM = False
ShowUI = False
NoReboot = False
NoPrerequisites = False
UIMode = Normal
LogPath =
VerboseLog = False
WorkingDirectory = C:\Users\tluk\AppData\Local\Temp\rbt_6f491a8f-fd4d-4361-a977-7d91426b7d1b
InstallDirectory = C:\Program Files\Citrix
PreSelectedComponents =
CDRoot =
InstallationResuming = False
EnableFlashSecurity = False
EnableProGraphics = False
ProGraphicsKeyFile =
ChangeFirewall = False
ConfigureBrokerPorts = False
ConfigureUdpPorts = False
ConfigureRemoteAssistance = False
ConfigureRemoteManagement = False
OptimizeVirtualMachine = False
IsVirtualMachine = True
IsVMWareVirtualMachine = True
XenAppServerLocation =
FarmGuid =
ControllerNames =
WcfPort =
NoCitrixWDDM = False
CitrixWddmOnHyperV = False
EnabledPersonalVDisk = False
Virtual Desktop Agent,

18:14:56.9386 : XenDesktopSetup:Product with upgrade code {30411FC2-9D05-43FE-9D85-A0F3BDDBD306} is not installed.
18:14:56.9386 : XenDesktopSetup:Product with upgrade code {4A80D587-C1F4-4B5B-874C-398EDA0D0EE7} is not installed.
18:14:56.9386 : XenDesktopSetup:Component group Virtual Desktop Agent installation status is PartiallyInstalled
18:14:56.9436 : XenDesktopSetup:Product with upgrade code {4A80D587-C1F4-4B5B-874C-398EDA0D0EE7} is not installed.
18:14:57.0596 : XenDesktopSetup:CheckRegKeyExists: RegKey Software\WoW6432Node\Citrix\PluginPackages\XenAppSuite\ICA_Client: Opened Registry Key successfully.
18:14:57.0606 : XenDesktopSetup:Product with upgrade code {C6F601FC-380A-4399-B1E9-7B881F70D1D2} is not installed.
18:14:57.0606 : XenDesktopSetup:Component group Citrix Receiver installation status is NotInstalled
18:14:57.0887 : XenDesktopSetup:Product with upgrade code {30411FC2-9D05-43FE-9D85-A0F3BDDBD306} is not installed.
18:14:57.0887 : XenDesktopSetup:Product with upgrade code {4A80D587-C1F4-4B5B-874C-398EDA0D0EE7} is not installed.
18:14:57.0887 : XenDesktopSetup:Component group Virtual Desktop Agent installation status is PartiallyInstalled
18:14:57.0887 : XenDesktopSetup:CheckRegKeyExists: RegKey Software\WoW6432Node\Citrix\PluginPackages\XenAppSuite\ICA_Client: Opened Registry Key successfully.
18:14:57.0887 : XenDesktopSetup:Product with upgrade code {C6F601FC-380A-4399-B1E9-7B881F70D1D2} is not installed.
18:14:57.0887 : XenDesktopSetup:Component group Citrix Receiver installation status is NotInstalled
18:14:57.0987 : XenDesktopSetup:Product with upgrade code {30411FC2-9D05-43FE-9D85-A0F3BDDBD306} is not installed.
18:14:57.0987 : XenDesktopSetup:Product with upgrade code {4A80D587-C1F4-4B5B-874C-398EDA0D0EE7} is not installed.
18:14:57.0987 : XenDesktopSetup:Component group Virtual Desktop Agent installation status is PartiallyInstalled
18:14:57.0987 : XenDesktopSetup:CheckRegKeyExists: RegKey Software\WoW6432Node\Citrix\PluginPackages\XenAppSuite\ICA_Client: Opened Registry Key successfully.
18:14:57.0997 : XenDesktopSetup:Product with upgrade code {C6F601FC-380A-4399-B1E9-7B881F70D1D2} is not installed.
18:14:57.0997 : XenDesktopSetup:Component group Citrix Receiver installation status is NotInstalled
18:14:59.8319 : XenDesktopSetup:Product with upgrade code {30411FC2-9D05-43FE-9D85-A0F3BDDBD306} is not installed.
18:14:59.8319 : XenDesktopSetup:Product with upgrade code {4A80D587-C1F4-4B5B-874C-398EDA0D0EE7} is not installed.
18:14:59.8319 : XenDesktopSetup:Component group Virtual Desktop Agent installation status is PartiallyInstalled
18:14:59.9219 : XenDesktopSetup:Product with upgrade code {30411FC2-9D05-43FE-9D85-A0F3BDDBD306} is not installed.
18:14:59.9929 : XenDesktopSetup:Product with upgrade code {30411FC2-9D05-43FE-9D85-A0F3BDDBD306} is not installed.
18:14:59.9929 : XenDesktopSetup:Product with upgrade code {4A80D587-C1F4-4B5B-874C-398EDA0D0EE7} is not installed.
18:14:59.9929 : XenDesktopSetup:Component group Virtual Desktop Agent installation status is PartiallyInstalled
18:14:59.9939 : XenDesktopSetup:CheckRegKeyExists: RegKey Software\WoW6432Node\Citrix\PluginPackages\XenAppSuite\ICA_Client: Opened Registry Key successfully.
18:14:59.9939 : XenDesktopSetup:Product with upgrade code {C6F601FC-380A-4399-B1E9-7B881F70D1D2} is not installed.
18:14:59.9939 : XenDesktopSetup:Component group Citrix Receiver installation status is NotInstalled
18:14:59.9939 : XenDesktopSetup:Checking dependencies for installed component groups:
18:14:59.9959 : XenDesktopSetup:'Citrix Virtual Desktop Agent' is depended by 0 groups:
18:14:59.9959 : XenDesktopSetup:'Microsoft .NET Framework 3.5 Service Pack 1' is depended by 0 groups:
18:14:59.9959 : XenDesktopSetup:'Virtual Desktop Agent' is depended by 0 groups:
18:14:59.9959 : XenDesktopSetup:'Machine Identity Service' is depended by 0 groups:
18:14:59.9959 : XenDesktopSetup:'Personal vDisk' is depended by 0 groups:
18:14:59.9959 : XenDesktopSetup:'Citrix Online Plug-in' is depended by 0 groups:
18:14:59.9959 : XenDesktopSetup:'Citrix Offline Plug-in' is depended by 0 groups:
18:14:59.9959 : XenDesktopSetup:The following components have been unscheduled due to existing dependencies:
18:15:00.0349 : XenDesktopSetup:Product with upgrade code {30411FC2-9D05-43FE-9D85-A0F3BDDBD306} is not installed.
18:15:00.0349 : XenDesktopSetup:Product with upgrade code {4A80D587-C1F4-4B5B-874C-398EDA0D0EE7} is not installed.
18:15:00.0349 : XenDesktopSetup:Component group Virtual Desktop Agent installation status is NotInstalled
18:15:01.6311 : XenDesktopSetup:Installation action = Remove
18:15:01.6321 : XenDesktopSetup:Groups scheduled for action: 'Virtual Desktop Agent',
18:15:01.6321 : XenDesktopSetup:Product with upgrade code {30411FC2-9D05-43FE-9D85-A0F3BDDBD306} is not installed.
18:15:01.6331 : XenDesktopSetup:Product with upgrade code {30411FC2-9D05-43FE-9D85-A0F3BDDBD306} is not installed.
18:15:01.6331 : XenDesktopSetup:Product with upgrade code {4A80D587-C1F4-4B5B-874C-398EDA0D0EE7} is not installed.
18:15:01.6331 : XenDesktopSetup:Component group Virtual Desktop Agent installation status is PartiallyInstalled
18:15:01.6331 : XenDesktopSetup:CheckRegKeyExists: RegKey Software\WoW6432Node\Citrix\PluginPackages\XenAppSuite\ICA_Client: Opened Registry Key successfully.
18:15:01.6331 : XenDesktopSetup:Product with upgrade code {C6F601FC-380A-4399-B1E9-7B881F70D1D2} is not installed.
18:15:01.6341 : XenDesktopSetup:Component group Citrix Receiver installation status is NotInstalled
18:15:01.6341 : XenDesktopSetup:Checking dependencies for installed component groups:
18:15:01.6341 : XenDesktopSetup:'Citrix Virtual Desktop Agent' is depended by 0 groups:
18:15:01.6341 : XenDesktopSetup:'Microsoft .NET Framework 3.5 Service Pack 1' is depended by 0 groups:
18:15:01.6341 : XenDesktopSetup:'Virtual Desktop Agent' is depended by 0 groups:
18:15:01.6341 : XenDesktopSetup:'Machine Identity Service' is depended by 0 groups:
18:15:01.6341 : XenDesktopSetup:'Personal vDisk' is depended by 0 groups:
18:15:01.6341 : XenDesktopSetup:'Citrix Online Plug-in' is depended by 0 groups:
18:15:01.6341 : XenDesktopSetup:'Citrix Offline Plug-in' is depended by 0 groups:
18:15:01.6341 : XenDesktopSetup:The following components have been unscheduled due to existing dependencies:
18:15:01.6341 : XenDesktopSetup:Product with upgrade code {30411FC2-9D05-43FE-9D85-A0F3BDDBD306} is not installed.
18:15:01.6341 : XenDesktopSetup:Product with upgrade code {4A80D587-C1F4-4B5B-874C-398EDA0D0EE7} is not installed.
18:15:01.6341 : XenDesktopSetup:Component group Virtual Desktop Agent installation status is NotInstalled
18:15:01.6691 : XenDesktopSetup:Total remove cost = 4
18:15:01.6771 : XenDesktopSetup:About to initialize component 'Virtual Desktop Agent'
18:15:01.6811 : XenDesktopSetup:Successfully initialized component 'Virtual Desktop Agent'
18:15:01.6811 : XenDesktopSetup:About to initialize component 'Citrix Virtual Desktop Agent'
18:15:01.6821 : XenDesktopSetup:Successfully initialized component 'Citrix Virtual Desktop Agent'
18:15:01.7001 : XenDesktopSetup:Remove action requested on component 'Virtual Desktop Agent'
18:15:01.7001 : XenDesktopSetup:About to remove component 'Virtual Desktop Agent'
18:15:01.7451 : XenDesktopSetup:About to remove MSI with product code '{569E8A6E-14CC-47C2-ABCE-489EB5B1251C}' (XdsAgent_x64) using parameters ''
18:15:01.8391 : XenDesktopSetup:Starting process 'msiexec' with args '/x "{569E8A6E-14CC-47C2-ABCE-489EB5B1251C}" /lv "C:\Users\tluk\AppData\Local\Temp\Citrix\XenDesktop Installer\MSI Log Files\XdsAgent_x64_uninstall1458828102.txt" /quiet  REBOOT=ReallySuppress REBOOTPROMPT=Suppress'
18:15:04.3084 : XenDesktopSetup:Process completed with error code 1603
18:15:04.3144 : XenDesktopSetup:Removal of MSI Product '{569E8A6E-14CC-47C2-ABCE-489EB5B1251C}' failed with code 'InstallFailure'
18:15:04.3164 : XenDesktopSetup:Failed to remove component 'Virtual Desktop Agent'. Uninstallation of VDA MSI failed. VDA Upgrade Code is:{C5CA087F-BA72-41A1-A469-E137ECB54D2E}
18:15:04.3184 : XenDesktopSetup:Recording installation failure from component 'Virtual Desktop Agent'
18:15:04.3264 : XenDesktopSetup:Remove failed
18:15:04.3734 : XenDesktopSetup:InstallationManager returned Failed
18:15:07.3787 : XenDesktopSetup:MetaInstaller terminating

Still not aware of the root cause, I went ahead and try to run the XenDesktop 5.6 VDA agent installer again and while I was able to successfully go through the install via changing the components, I was still unable to uninstall the VDA agent, the 5.6.300 update or install the 5.6.400 update.

After leaving the VDI for a few hours while I worked on something else, I finally realized that this may be related to the Google Earth Optimization Pack d3d9.dll changes I made so I went ahead and copied the original Windows file back to the the directors with the following batch file:

XCOPY "\\someFileServer\Software\Citrix\XenDesktop\OptimizationPackforGoogleEarth\x64\originalWindows\d3d9.dll" "C:\Program Files (x86)\Google\Google Earth\client\alchemy\ogles20" /Y
XCOPY "\\someFileServer\Software\Citrix\XenDesktop\OptimizationPackforGoogleEarth\x64\originalWindows\d3d9.dll" "C:\Program Files (x86)\Google\Google Earth\plugin\alchemy\ogles20" /Y
XCOPY "\\someFileServer\Software\Citrix\XenDesktop\OptimizationPackforGoogleEarth\x64\originalWindows\d3d9.dll" "C:\Program Files (x86)\Google\Google Earth\client" /Y
XCOPY "\\someFileServer\Software\Citrix\XenDesktop\OptimizationPackforGoogleEarth\x64\originalWindows\d3d9.dll" "C:\Program Files (x86)\Google\Google Earth\plugin" /Y
taskkill /F /IM TeamViewer.exe
taskkill /F /IM TeamViewer_Service.exe
taskkill /F /IM Lync.exe
taskkill /F /IM iexplore.exe
XCOPY "\\someFileServer\Software\Citrix\XenDesktop\OptimizationPackforGoogleEarth\x64\originalWindows\d3d9.dll" "C:\WINDOWS\SYSWOW64" /Y
pause

The reason why batch file has the taskkill commands is because those applications tend to lock the d3d9.dll file in the C:\Windows\SysWOW64 directory.

Once I got the original d3d9.dll file back in those directories, I was able to upgrade the VDA agent. Once I got the VDA agent upgraded, I went ahead and replaced the file again with the Google Optimization pack file.

Hope this helps anyone out there who may come across this issue as I searched for the error messages in the logs but couldn’t find anything.

Script for automatically restarting XenDesktop Dedicated Pools VDIs

I recently had the opportunity to work with 2 consultants from Citrix Consulting Services for a client who has been experiencing performance issues in their remote office and one of the recommendations was to schedule weekly reboots for their dedicated desktops on a weekly basis to eliminate any issues caused by memory leaks in the Windows 7 operating system.  This, as some administrators know, can be done by using the Set-BrokerDesktopGroup cmdlet with the -ShutdownDesktopsAfterUse while playing around with the Power on/off machines option to force VDIs to get powered up after it has been shutdown.  The challenge with this is that you may have a window where the VDIs are shutdown and if you need to simply do a quick restart every day or every week, this may not work.  Furthermore, the client that I’m working with would like a restart prompt presented to users who are logged on at a set time with the option of allowing them to either allow a reboot or cancel it.

After doing a bit of research, I came to realize that one of ways to do this was to use a batch file and the best one I found was here:

http://community.spiceworks.com/topic/256591-afterhours-power-conservation-shutdown-script-with-prompt-to-allow-user-cancel

@ECHO OFF

:myLabel

SHUTDOWN /S /F /T 600

SET /P continue="Your computer is about to shutdown in 10 min do you want to abort (y/n): "

IF %continue% EQU y (

SHUTDOWN /A

)

The batch file command above shuts down the desktop so a small change needs to be made to the switches so it looks as such instead:

@ECHO OFF

:myLabel

SHUTDOWN /R /F /T 600

SET /P continue="Your computer is about to restart in 10 min do you want to abort (y/n): "

IF %continue% EQU y (

SHUTDOWN /A

)

If you launch these commands in a batch file, you will get a cmd prompt window open allowing the user to hit Y to abort the restart and N to allow.  In addition to the cmd prompt window, a regular Windows window would pop up indicating that the computer will be restarted in 10 minutes and if shutdown is aborted, the user will see a small notification bubble at the task bar reading:

Logoff is cancelled

The scheduled shutdown has been cancelled.

image

With this batch file in hand, you can then create a new GPO to assign to the Active Directory OU containing the computer objects as such:

image

Note that it is obviously not best practice to user a regular user account for this so create a proper service account to run this scheduled task:

image

Configure the frequency of the restart:

image

Place the batch file to a network location:

image

Once this GPO is created and the desktop has refreshed Group Policy, you should see the scheduled task as such:

image

The small batch file may not be the most visual appealing but I can see this being useful to have whether it’s used for a virtual or physical desktop.

Tuesday, February 25, 2014

Importing PSTs into Microsoft Exchange Server 2013 with PowerShell

I had to import a bunch of exported PSTs into a new Microsoft Exchange Server 2013 environment as we had to migrate a new client from another hosting provider onto our platform and as I haven’t done it for awhile, I didn’t realize how many errors I ran into in the past so I figure I’d write a blog post that I can refer to in the future.

The PowerShell cmdlet used for importing mailboxes is New-MailboxImportRequest which can be found at the following TechNet article:

New-MailboxImportRequest
http://technet.microsoft.com/en-us/library/ff607310(v=exchg.150).aspx

Prior to begin importing PSTs, you will need to assign a user with permissions to perform the action as described in the following TechNet article:

Recipients Permissions
http://technet.microsoft.com/en-us/library/dd638132(v=exchg.150).aspx

To grant the permission, use the following cmdlet to add a user to the Mailbox Import Export role:

New-ManagementRoleAssignment -Role "Mailbox Import Export" -User Administrator

**Note that I’ve assigned the Administrator account the role in the cmdlet shown above.

image

With the permissions set, the cmdlet used to import a PST into a mailbox of a user creating a folder named “Migrated Emails” would look like following:

New-MailboxImportRequest -Mailbox "John Smith" -FilePath \\someFileServer\E$\someFolder\john_smith.pst -TargetRootFolder "Migrated Emails"

Once the cmdlet above has been executed, you can use the Get-MailboxImportRequest cmdlet to view the status:

image

Once the PST import has successfully completed, you should see an output similar to the following:

image

To clear the completed mailbox imports, you can use the following cmdlet:

Get-MailboxImportRequest -Status Completed | Remove-MailboxImportRequest

image

There will be times when you’ll notice that various imports mail fail and to investigate why the move has failed, you can use the following cmdlet to include a report:

Get-MailboxImportRequest -Status Failed | Get-MailboxImportRequestStatistics -IncludeReport | Format-List > AllImportReports.txt

image

What I’ve found in the past is that the 2 reasons why imports would fail are:

  1. Bad Items
  2. Large Items that exceed the mailbox stores’ limits

To get around the bad items, you can set a limit of bad items you are willing to skip as such:

New-MailboxImportRequest -Mailbox "Maria Smit" -FilePath \\someServer\E$\someFolder\maria.pst -TargetRootFolder "Migrated Emails" -BadItemLimit 10

Note that if you specify a bad item limit of higher than 50, you will also need to use the switch to avoid having the cmdlet fail:

-AcceptLargeDataLoss

To get around the large items, you can use the following switch to ignore the size of the large item limit and to import them anyways:

New-MailboxImportRequest -Mailbox "Maria Smit" -FilePath \\someServer\E$\someFolder\maria.pst -TargetRootFolder "Migrated Emails" -LargeItemLimit 10

Sunday, February 23, 2014

Exchange 2007 to 2010 mailbox move fails with: “Fatal error MapiExceptionInvalidParameter has occurred.”

Problem

You attempt to move a mailbox from Exchange 2007 to 2010 but noticed that the Move Request fails at 95%:

image

image

Proceeding to the Details tab reveals the following Suspended comment:

image

Error: MapiExceptionInvalidParameter: Unable to modify table. (hr=0x80070057, ec=-2147024809)

Diagnostic context:

Lid: 55847 EMSMDBPOOL.EcPoolSessionDoRpc called [length=228]

Lid: 43559 EMSMDBPOOL.EcPoolSessionDoRpc returned [ec=0x0][length=652][latency=46]

Lid: 23226 --- ROP Parse Start ---

Lid: 27962 ROP: ropModifyRules [65]

Lid: 17082 ROP Error: 0x80070057

Lid: 27745

Lid: 21921 StoreEc: 0x80070057

Lid: 27962 ROP: ropExtendedError [250]

Lid: 1494 ---- Remote Context Beg ----

Lid: 1238 Remote Context Overflow

Lid: 21970 StoreEc: 0x8004010F PropTag: 0x67870102

Lid: 21970 StoreEc: 0x8004010F PropTag: 0x668F0040

Lid: 21970 StoreEc: 0x8004010F PropTag: 0x67AA000B

Lid: 21970 StoreEc: 0x8004010F PropTag: 0x67870102

Lid: 21970 StoreEc: 0x8004010F PropTag: 0x668F0040

Lid: 21970 StoreEc: 0x8004010F PropTag: 0x67AA000B

Lid: 21970 StoreEc: 0x8004010F PropTag: 0x67870102

Lid: 21970 StoreEc: 0x8004010F PropTag: 0x668F0040

Lid: 21970 StoreEc: 0x8004010F PropTag: 0x67AA000B

Lid: 21970 StoreEc: 0x8004010F PropTag: 0x67870102

Lid: 21970 StoreEc: 0x8004010F PropTag: 0x67F60040

Lid: 48851

Lid: 21970 StoreEc: 0x8004010F PropTag: 0x67F60040

Lid: 65267

Lid: 40691

Lid: 5559 StoreEc: 0x80070057

Lid: 65015

Lid: 65439

Lid: 4302 StoreEc: 0x80070057

Lid: 1750 ---- Remote Context End ----

Lid: 26849

Lid: 21817 ROP Failure: 0x80070057

Lid: 29150

Lid: 20446 StoreEc: 0x80070057

Continuing to the Log tab and clicking the View button displays the following verbose logs:

image

1/30/2014 11:28:54 AM [MailServer01] 'contoso.com/contoso/Bermuda/Users/Terence Luk' created move request.
1/30/2014 11:28:59 AM [MailServer04] The Microsoft Exchange Mailbox Replication service 'MailServer04.contoso.com' (14.3.151.0 caps:07) is examining the request.
1/30/2014 11:28:59 AM [MailServer04] Connected to target mailbox 'Primary (f323d788-25ef-4604-8536-fcec2eb153c3)', database 'Asia Mailbox Database', Mailbox server 'MailServer01.contoso.com' Version 14.3 (Build 123.0).
1/30/2014 11:28:59 AM [MailServer04] Connected to source mailbox 'Primary (f323d788-25ef-4604-8536-fcec2eb153c3)', database 'contosoMS01\Third Storage Group\New Mailbox Database', Mailbox server 'contosoms01.contoso.com' Version 8.3 (Build 245.0).
1/30/2014 11:28:59 AM [MailServer04] Request processing started.
1/30/2014 11:28:59 AM [MailServer04] Mailbox signature will not be preserved for mailbox 'Primary (f323d788-25ef-4604-8536-fcec2eb153c3)'. Outlook clients will need to restart to access the moved mailbox.
1/30/2014 11:29:00 AM [MailServer04] Source mailbox information before the move:
Regular Items: 14861, 6.575 GB (7,059,980,564 bytes)
Regular Deleted Items: 2, 3.867 MB (4,054,770 bytes)
FAI Items: 154, 0 B (0 bytes)
FAI Deleted Items: 0, 8.15 KB (8,346 bytes)
1/30/2014 11:29:01 AM [MailServer04] Initializing folder hierarchy in mailbox 'Primary (f323d788-25ef-4604-8536-fcec2eb153c3)': 145 folders total.
1/30/2014 11:29:02 AM [MailServer04] Folder hierarchy initialized for mailbox 'Primary (f323d788-25ef-4604-8536-fcec2eb153c3)': 145 folders total.
1/30/2014 11:29:02 AM [MailServer04] Stage: CreatingInitialSyncCheckpoint. Percent complete: 15.
1/30/2014 11:29:06 AM [MailServer04] Stage: LoadingMessages. Percent complete: 20.
1/30/2014 11:29:07 AM [MailServer04] Mailbox 'Primary (f323d788-25ef-4604-8536-fcec2eb153c3)' contains 4 soft-deleted items (3.867 MB (4,054,502 bytes)). They won't be migrated.
1/30/2014 11:29:07 AM [MailServer04] Stage: CopyingMessages. Percent complete: 25.
1/30/2014 11:29:07 AM [MailServer04] Copy progress: 0/15011 messages, 0 B (0 bytes)/6.575 GB (7,059,979,292 bytes).
1/30/2014 11:29:08 AM [MailServer04] Messages have been enumerated successfully. 15011 items loaded. Total size: 6.575 GB (7,059,979,292 bytes).
1/30/2014 11:34:08 AM [MailServer04] Stage: CopyingMessages. Percent complete: 32.
1/30/2014 11:34:08 AM [MailServer04] Copy progress: 1819/15011 messages, 757.3 MB (794,036,146 bytes)/6.575 GB (7,059,979,292 bytes).
1/30/2014 11:39:09 AM [MailServer04] Stage: CopyingMessages. Percent complete: 40.
1/30/2014 11:39:09 AM [MailServer04] Copy progress: 2539/15011 messages, 1.488 GB (1,597,760,004 bytes)/6.575 GB (7,059,979,292 bytes).
1/30/2014 11:44:10 AM [MailServer04] Stage: CopyingMessages. Percent complete: 47.
1/30/2014 11:44:10 AM [MailServer04] Copy progress: 3620/15011 messages, 2.107 GB (2,262,009,276 bytes)/6.575 GB (7,059,979,292 bytes).
1/30/2014 11:49:10 AM [MailServer04] Stage: CopyingMessages. Percent complete: 54.
1/30/2014 11:49:10 AM [MailServer04] Copy progress: 4833/15011 messages, 2.801 GB (3,007,770,072 bytes)/6.575 GB (7,059,979,292 bytes).
1/30/2014 11:54:12 AM [MailServer04] Stage: CopyingMessages. Percent complete: 61.
1/30/2014 11:54:12 AM [MailServer04] Copy progress: 7051/15011 messages, 3.433 GB (3,686,175,829 bytes)/6.575 GB (7,059,979,292 bytes).
1/30/2014 11:59:12 AM [MailServer04] Stage: CopyingMessages. Percent complete: 68.
1/30/2014 11:59:12 AM [MailServer04] Copy progress: 9695/15011 messages, 4.117 GB (4,420,836,101 bytes)/6.575 GB (7,059,979,292 bytes).
1/30/2014 12:04:13 PM [MailServer04] Stage: CopyingMessages. Percent complete: 76.
1/30/2014 12:04:13 PM [MailServer04] Copy progress: 11940/15011 messages, 4.805 GB (5,159,692,615 bytes)/6.575 GB (7,059,979,292 bytes).
1/30/2014 12:09:14 PM [MailServer04] Stage: CopyingMessages. Percent complete: 83.
1/30/2014 12:09:14 PM [MailServer04] Copy progress: 12782/15011 messages, 5.51 GB (5,916,507,136 bytes)/6.575 GB (7,059,979,292 bytes).
1/30/2014 12:14:14 PM [MailServer04] Stage: CopyingMessages. Percent complete: 90.
1/30/2014 12:14:14 PM [MailServer04] Copy progress: 13599/15011 messages, 6.141 GB (6,593,692,925 bytes)/6.575 GB (7,059,979,292 bytes).
1/30/2014 12:17:50 PM [MailServer04] Initial seeding completed, 15011 items copied, total size 6.575 GB (7,059,979,292 bytes).
1/30/2014 12:17:50 PM [MailServer04] Changes reported in source 'Primary (f323d788-25ef-4604-8536-fcec2eb153c3)': 0 changed folders, 0 deleted folders, 1 changed messages.
1/30/2014 12:17:50 PM [MailServer04] Incremental Sync 'Primary (f323d788-25ef-4604-8536-fcec2eb153c3)' completed: 1 changed items.
1/30/2014 12:17:50 PM [MailServer04] Stage: IncrementalSync. Percent complete: 95.
1/30/2014 12:17:51 PM [MailServer04] Final sync has started.
1/30/2014 12:18:01 PM [MailServer04] Changes reported in source 'Primary (f323d788-25ef-4604-8536-fcec2eb153c3)': 0 changed folders, 0 deleted folders, 0 changed messages.
1/30/2014 12:18:01 PM [MailServer04] Incremental Sync 'Primary (f323d788-25ef-4604-8536-fcec2eb153c3)' completed: 0 changed items.
1/30/2014 12:18:18 PM [MailServer04] Fatal error MapiExceptionInvalidParameter has occurred.
Error details: MapiExceptionInvalidParameter: Unable to modify table. (hr=0x80070057, ec=-2147024809)
Diagnostic context:
    Lid: 55847   EMSMDBPOOL.EcPoolSessionDoRpc called [length=228]
    Lid: 43559   EMSMDBPOOL.EcPoolSessionDoRpc returned [ec=0x0][length=652][latency=46]
    Lid: 23226   --- ROP Parse Start ---
    Lid: 27962   ROP: ropModifyRules [65]
    Lid: 17082   ROP Error: 0x80070057
    Lid: 27745 
    Lid: 21921   StoreEc: 0x80070057
    Lid: 27962   ROP: ropExtendedError [250]
    Lid: 1494    ---- Remote Context Beg ----
    Lid: 1238    Remote Context Overflow
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x67870102
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x668F0040
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x67AA000B
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x67870102
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x668F0040
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x67AA000B
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x67870102
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x668F0040
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x67AA000B
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x67870102
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x67F60040
    Lid: 48851 
    Lid: 21970   StoreEc: 0x8004010F PropTag: 0x67F60040
    Lid: 65267 
    Lid: 40691 
    Lid: 5559    StoreEc: 0x80070057
    Lid: 65015 
    Lid: 65439 
    Lid: 4302    StoreEc: 0x80070057
    Lid: 1750    ---- Remote Context End ----
    Lid: 26849 
    Lid: 21817   ROP Failure: 0x80070057
    Lid: 29150 
    Lid: 20446   StoreEc: 0x80070057
   at Microsoft.Mapi.MapiExceptionHelper.ThrowIfError(String message, Int32 hresult, SafeExInterfaceHandle iUnknown, Exception innerException)
   at Microsoft.Mapi.MapiModifyTable.ModifyTable(ModifyTableFlags flags, ICollection`1 rowList)
   at Microsoft.Mapi.MapiFolder.AddRules(Rule[] rules)
   at Microsoft.Mapi.MapiFolder.SetRules(Rule[] rules)
   at Microsoft.Exchange.MailboxReplicationService.LocalDestinationFolder.Microsoft.Exchange.MailboxReplicationService.IDestinationFolder.SetRules(RuleData[] rules)
   at Microsoft.Exchange.MailboxReplicationService.DestinationFolderWrapper.<>c__DisplayClass31.<Microsoft.Exchange.MailboxReplicationService.IDestinationFolder.SetRules>b__30()
   at Microsoft.Exchange.MailboxReplicationService.ExecutionContext.Execute(GenericCallDelegate operation)
   at Microsoft.Exchange.MailboxReplicationService.DestinationFolderWrapper.Microsoft.Exchange.MailboxReplicationService.IDestinationFolder.SetRules(RuleData[] rules)
   at Microsoft.Exchange.MailboxReplicationService.FolderRecWrapper.WriteRules(IDestinationFolder targetFolder)
   at Microsoft.Exchange.MailboxReplicationService.MailboxCopierBase.CopyFolderProperties(FolderRecWrapper folderRec, ISourceFolder sourceFolder, IDestinationFolder destFolder, FolderRecDataFlags dataToCopy)
   at Microsoft.Exchange.MailboxReplicationService.MailboxMover.<>c__DisplayClass2.<>c__DisplayClass4.<FinalSyncCopyAllFolders>b__1()
   at Microsoft.Exchange.MailboxReplicationService.ExecutionContext.Execute(GenericCallDelegate operation)
   at Microsoft.Exchange.MailboxReplicationService.MailboxMover.<>c__DisplayClass2.<FinalSyncCopyAllFolders>b__0(FolderRecWrapper folderRec, EnumFolderContext ctx)
   at Microsoft.Exchange.MailboxReplicationService.FolderMap.EnumSingleFolder(FolderRecWrapper folderRec, EnumFolderContext ctx, EnumFolderCallback callback, EnumHierarchyFlags flags)
   at Microsoft.Exchange.MailboxReplicationService.FolderMap.EnumSingleFolder(FolderRecWrapper folderRec, EnumFolderContext ctx, EnumFolderCallback callback, EnumHierarchyFlags flags)
   at Microsoft.Exchange.MailboxReplicationService.FolderMap.EnumSingleFolder(FolderRecWrapper folderRec, EnumFolderContext ctx, EnumFolderCallback callback, EnumHierarchyFlags flags)
   at Microsoft.Exchange.MailboxReplicationService.FolderMap.EnumSingleFolder(FolderRecWrapper folderRec, EnumFolderContext ctx, EnumFolderCallback callback, EnumHierarchyFlags flags)
   at Microsoft.Exchange.MailboxReplicationService.MailboxMover.FinalSyncCopyAllFolders()
   at Microsoft.Exchange.MailboxReplicationService.MoveBaseJob.<FinalSync>b__4d(MailboxMover mbxCtx)
   at Microsoft.Exchange.MailboxReplicationService.MoveBaseJob.ForeachMailboxContext(MailboxMoverDelegate del)
   at Microsoft.Exchange.MailboxReplicationService.MoveBaseJob.FinalSync(Object[] wiParams)
   at Microsoft.Exchange.MailboxReplicationService.CommonUtils.CatchKnownExceptions(GenericCallDelegate del, FailureDelegate failureDelegate)
Error context: --------
Operation: IDestinationFolder.SetRules
OperationSide: Target
Primary (f323d788-25ef-4604-8536-fcec2eb153c3)
Rules: [Rule: Condition: none; Actions: [RuleAction: OOFREPLY TemplateEID:[len=70, data=00000000EF3A814DA7AA3D43BA1745450B92452507001615272E4E643E45967C8A0AA6C68D4400CD5354D99600001615272E4E643E45967C8A0AA6C68D4400CF2B0984B40000], TemplateGuid:cef3470e-3e8e-4680-85bc-763348af8165, Flags:0]; Name 'MSFT:TDX OOF Rules'; Provider: 'MSFT:TDX OOF Rules'; ProviderData: ; ExecutionSequence: 50; Level: 0; StateFlags: 141; UserFlags: 2; IsExtended: False]
--------
Folder: '/Top of Information Store/Archive/Inbox', entryId [len=46, data=00000000EF3A814DA7AA3D43BA1745450B9245250100B6F293EEFC8DAA4DB36D6541DB56FFFB000214CBA6BE0000], parentId [len=46, data=00000000EF3A814DA7AA3D43BA1745450B9245250100B6F293EEFC8DAA4DB36D6541DB56FFFB000214CBA6BD0000]
1/30/2014 12:18:18 PM [MailServer04] Relinquishing job.

All of the other mailboxes are moved successfully so you know this error is specific to this user.

Solution

The line that tipped off what the mailbox move was failing on was the following:

Folder: '/Top of Information Store/Archive/Inbox', entryId [len=46,

Since the user was on vacation, I went ahead and reset her password so I could log into her mailbox to have a look at the folders and as indicated in the line above, I found an Inbox folder located in an Archive folder:

image

With the hunch that the folder may be corrupted, I renamed the Inbox folder to OLD-Inbox:

image

… created a new Inbox folder:

image

… then moved all the OLD-Inbox folder items into the new Inbox folder:

image

I proceeded to delete the OLD-Inbox folder:

image image

… and then permanently deleted it from the Deleted Items folder:

image

**Note that the step above is important because if you don’t remove the corrupted folder from the Deleted Items the next mailbox move would fail.

Once steps above were done, the mailbox move completed successfully.

Friday, February 21, 2014

Attempting to decommission an Exchange 2003 server throws the error: “The component “Microsoft Exchange Messaging and Collaboration Services” cannot be assigned the action “Remove” because: - One or more users currently use a mailbox store on this server. These users must be moved to a mailbox store on a different server or be mail disabled before uninstalling this server.”

As many Exchange 2003 to 2007 and 2010 migrations I’ve done over the years, I think the part of the migration I dread most is the end of the migration when the Exchange 2003 server needs to be decommissioned.  Other than making sure that all the mailboxes are moved, public folders fully replicated and moved over, and all of your legacy routing connectors are recreated for large organizations that still have Exchange 2003 servers, I find that I almost always receive errors when I try to use the Add and Remove Programs wizard to uninstall Exchange.

Just when I thought I’ve seen all of the possible reasons why an uninstall would fail, one of the recent Exchange 2003 migrations threw me the following new error:

image

image

The component “Microsoft Exchange Messaging and Collaboration Services” cannot be assigned the action “Remove” because:
- One or more users currently use a mailbox store on this server. These users must be moved to a mailbox store on a different server or be mail disabled before uninstalling this server.

This was the last error of the 3 I fixed (the other ones being routing members and routing groups) and while I’ve seen something like this before where various users weren’t visible by browsing the mailbox stores on the Exchange 2003 servers via the System Manager console, so you had to use the following KB:

Error message when you try to remove Exchange Server from a mailbox server that no longer hosts mailboxes: "One or more users currently use a mailbox store on this server"
http://support.microsoft.com/kb/924170

To launch Active Directory Users and Computers, use the Find tool to search for users via the Exchange tab while checking:

  • Show only Exchange recipients
  • Users with Exchange mailbox

image

Then use the View tab to select the Choose Columns… option:

image

Then add the column Exchange Mailbox Store:

image

… then finally use the Exchange Home Server tab to sort the users and locate the mailboxes that are still associated with the Exchange 2003 server you are trying to decommission:

image

This has always worked for me but not for the last migration because no matter which domain I searched, I could not locate any mailboxes that are associated with the server I was trying to decommission:

image

After triple checking all the domains, I proceeded back to Google to see if I could find something that would help and that was when I came across this post:

http://social.technet.microsoft.com/Forums/exchange/en-US/2758744e-ab92-45af-bc01-5a1280887230/one-or-more-users-currently-use-a-mailbox-store-on-this-server?forum=exchange2010

So apparently there was another way to try searching for these mailboxes and that is to select the Custom Search option in the Find drop down menu:

image

Select the Advanced tab:

image

In the Enter LDAP query textbox, type in:

objectClass=User

Searching with this method finally revealed the mailboxes I was looking for:

image

Proceeding to select the accounts with the mailboxes and then using Exchange Tasks… enabled me to remove these mailboxes and proceed with the uninstall:

image

image image

image image

Once the mailboxes in question have been removed, proceed with restarting the uninstaller and the error should go away:

image image

image

Wednesday, February 19, 2014

Attempting to connect to a Citrix XenDesktop 5.6 VDI via the Web Interface portal fails

Problem

You attempt to connect to a Citrix XenDesktop 5.6 VDI via the Web Interface portal but nothing happens and the Desktop Viewer doesn’t launch:

image

Logging onto the VDI and reviewing the Application logs reveal the following:

Level: Error

Event ID: 9032

Source: Citrix ICA Service

Description: Citrix ICA could not configure Thinwire and switch to the remote ICA display. Rebooting the workstation or logging in at the console will fix this.

image

image

Solution

Citrix actually has a KB article for this issue that can be found at the following URL:  https://support.citrix.com/article/CTX118864

The reason why the connection fails is because the Citrix Display Driver (Citrix Systems – WDDM) display driver for her VDI was overwritten by the VMware version named VMware SVGA 3D.  Here’s a screenshot of what the desktop’s Device Manager may look like:

image

… and here is what it should look like:

image

One of the reasons why this would happen is if the VMware Tools of the virtual machine hosted on the ESXi server has been recently upgraded or was installed after the Citrix VDA agent was installed overwriting the display driver.  To correct the issue, simply reinstall the Citrix VDA agent to get the correct display driver back on.

Tuesday, February 18, 2014

Automatically displaying published applications on Citrix XenDesktop 7 StoreFront portal

As some administrators who have deployed Citrix XenDesktop 7 may know, the Web Interface has now been replaced with the new StoreFront server and out of the box, the portal looks as such:

image

While the interface is intuitive enough to lead the user to click on the + button to browse applications, some administrators prefer to publish the application more like the classic XenApp 6.5 with Web Interface look.  Although I have yet to figure out how to configure the StoreFront to display the classic look, I did find the following:

Integrating StoreFront into Your Environment
http://support.citrix.com/proddocs/topic/dws-storefront-12/dws-integrate.html

… describing how using keywords can perform the following:

Keyword: Featured

By adding the word Featured in the Description and Keywords field of the Application Settings as such:

image

… the application would be displayed as such in the StoreFront portal:

image

Keyword: Auto

By adding the word Auto in the Description and Keywords field of the Application Settings as such:

image

… the application would be displayed as such in the StoreFront portal:

image image

Note that users can still right click on the application and remove it:

image

What I’ve noticed is that if a user removes the application, it will not reappear on the front page regardless of whether they log off and back in, or if you remove the keyword for the application settings then add it back in.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

The following is a screenshot of what the applications look like with the keywords added:

image