08 September 2017

Exchange 2013 CU16 and CU17 failed cannot find path \V15\UnifiedMessaging\grammars because it does not exist

Weird, dumb, stupid, useless and above all irritating as hell.
Error messages that don't make any sense, and make total sense at the same time.
Like this one, it states that it cannot find the path to the folder "grammars" and errors out the installation of CU16 and CU17 in my case and fails.

After creating the folder "grammars" in the path C:\Program Files\Microsoft\Exchange Server\V15\UnifiedMessaging\ and restarting the CU installation everything went fine.


D:\Temp\cu16>setup.exe /mode:upgrade /iacceptexchangeserverlicenseterms

Microsoft Exchange Server 2013 Cumulative Update 16 Unattended Setup

Copying Files...
File copy complete. Setup will now collect additional information needed for
installation.
Mailbox role: Transport service
Client Access role: Front End Transport service
Mailbox role: Client Access service
Mailbox role: Unified Messaging service
Mailbox role: Mailbox service
Management tools
Client Access role: Client Access Front End service

Performing Microsoft Exchange Server Prerequisite Check

    Configuring Prerequisites                                 COMPLETED
    Prerequisite Analysis                                     COMPLETED

Configuring Microsoft Exchange Server

    Restoring Services                                        COMPLETED
    Mailbox role: Transport service                           COMPLETED
    Client Access role: Front End Transport service           COMPLETED
    Mailbox role: Client Access service                       COMPLETED
    Mailbox role: Unified Messaging service                   FAILED
     The following error was generated when "$error.Clear();
          $grammarPath = join-path $RoleInstallPath "UnifiedMessaging\grammars\*
";

          $dirs = get-item $grammarPath;

          foreach($d in $dirs)
          {
                  if($d -isnot [System.IO.DirectoryInfo])
                  {
                    continue;
                  }

            $path1 = $d.FullName + "\*";

            $items = get-item $path1 -include *.cfg;

            if($items -ne $null)
            {
              foreach($i in $items)
              {
                remove-item $i;
              }
            }
          }
        " was run: "System.Management.Automation.ItemNotFoundException: Cannot f
ind path 'C:\Program Files\Microsoft\Exchange Server\V15\UnifiedMessaging\gramma
rs' because it does not exist.
   at System.Management.Automation.LocationGlobber.ExpandMshGlobPath(String path
, Boolean allowNonexistingPaths, PSDriveInfo drive, ContainerCmdletProvider prov
ider, CmdletProviderContext context)
   at System.Management.Automation.LocationGlobber.ResolveDriveQualifiedPath(Str
ing path, CmdletProviderContext context, Boolean allowNonexistingPaths, CmdletPr
ovider& providerInstance)
   at System.Management.Automation.LocationGlobber.GetGlobbedMonadPathsFromMonad
Path(String path, Boolean allowNonexistingPaths, CmdletProviderContext context,
CmdletProvider& providerInstance)
   at System.Management.Automation.LocationGlobber.GetGlobbedProviderPathsFromMo
nadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext contex
t, ProviderInfo& provider, CmdletProvider& providerInstance)
   at System.Management.Automation.LocationGlobber.GetChildNamesInDir(String dir
, String leafElement, Boolean getAllContainers, CmdletProviderContext context, B
oolean dirIsProviderPath, PSDriveInfo drive, ContainerCmdletProvider provider, S
tring& modifiedDirPath)
   at System.Management.Automation.LocationGlobber.GenerateNewPSPathsWithGlobLea
f(StringCollection currentDirs, PSDriveInfo drive, String leafElement, Boolean i
sLastLeaf, ContainerCmdletProvider provider, CmdletProviderContext context)
   at System.Management.Automation.LocationGlobber.ExpandMshGlobPath(String path
, Boolean allowNonexistingPaths, PSDriveInfo drive, ContainerCmdletProvider prov
ider, CmdletProviderContext context)
   at System.Management.Automation.LocationGlobber.ResolveDriveQualifiedPath(Str
ing path, CmdletProviderContext context, Boolean allowNonexistingPaths, CmdletPr
ovider& providerInstance)
   at System.Management.Automation.LocationGlobber.GetGlobbedMonadPathsFromMonad
Path(String path, Boolean allowNonexistingPaths, CmdletProviderContext context,
CmdletProvider& providerInstance)
   at System.Management.Automation.LocationGlobber.GetGlobbedProviderPathsFromMo
nadPath(String path, Boolean allowNonexistingPaths, CmdletProviderContext contex
t, ProviderInfo& provider, CmdletProvider& providerInstance)
   at System.Management.Automation.SessionStateInternal.GetItem(String[] paths,
CmdletProviderContext context)
   at Microsoft.PowerShell.Commands.GetItemCommand.ProcessRecord()".


The Exchange Server setup operation didn't complete. More details can be found
in ExchangeSetup.log located in the <SystemDrive>:\ExchangeSetupLogs folder.


D:\Temp\cu16>

10 comments:

  1. Same problem here. Same solution resolved issue.

    ReplyDelete
  2. Thanks, this also solved my issue.

    ReplyDelete
  3. Anonymous15/1/19 13:12

    Same issue faced while updating from Exch13 CU10 to C2121
    Thanks

    ReplyDelete
  4. Anonymous11/9/19 00:16

    same fixed for Cu12 to cu23

    ReplyDelete
  5. Same here, resolved by re-creating the folder.

    ReplyDelete
  6. Same issue and solution here with upgrading Exchange 2016 CU3 to CU14

    ReplyDelete
  7. Anonymous20/7/20 00:57

    Same problem upgrading to 2013 CU23.
    These upgrades are always buggy as heck, one could think someone at MS would care...

    ReplyDelete
  8. Same problem. to pass cu17 to cu18 .. same solution .. Thanks .

    ReplyDelete
  9. Anonymous25/2/21 04:09

    Inside that folder the subfolder "grammars" and "prompts" should be missing. If that is the case you need to create them.

    Optional: As the folder are empty you might restore the content now from a backup or if you do not have a backup you might try to copy the files from a Exchange server with the same patchlevel which do not have this issue. However in most cased the content isn´t needed as the upgrade should copy them from the ISO.

    ReplyDelete