How to fix Error 1218 on Windows 11

Why This Error Happens

Error 1218 typically occurs when the Windows Message Queuing (MSMQ) service, or another application that relies on message-based destinations (such as print spooler network paths or IPC named pipes), receives a destination string that doesn’t conform to the expected UNC or queue-path syntax. This is commonly caused by a malformed queue address (missing double backslashes, incorrect computer name, or invalid special characters), a corrupted MSMQ store on the local machine, or outdated/orphaned registry entries pointing to a destination that no longer resolves correctly. It can also surface after a Windows 11 feature update if the MSMQ optional component was partially reinstalled or left in an inconsistent state.

Step-by-Step Resolution Guide

  1. Verify the destination path syntax – If you’re referencing a message queue, confirm it follows the correct format: FormatName:DIRECT=OS:ComputerName\QueueName or \\ComputerName\QueueName. A single missing backslash or typo in the computer name will trigger this error.

  2. Check and restart the Message Queuing service

  • Press Win + R, type services.msc, and press Enter.
  • Locate Message Queuing, right-click → Restart.
  • If the service fails to restart, right-click → Properties → set Startup type to Automatic, then start it manually.
  1. Reinstall the MSMQ feature via Windows Features
  • Go to Settings → Apps → Optional Features → More Windows features.
  • Uncheck Microsoft Message Queue (MSMQ) Server, click OK, restart your PC.
  • Re-enable it the same way and restart again to force a clean reinitialization of the message store.
  1. Clear the corrupted MSMQ storage folder
  • Navigate to C:\Windows\System32\msmq\storage.
  • Rename the folder (e.g., storage_old) after stopping the Message Queuing service.
  • Restart the service to let Windows regenerate a fresh storage directory.
  1. Validate registry destination entries
  • Open regedit and go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters.
  • Confirm the MachineName and related path values match your current computer name and domain/workgroup settings; correct any mismatches caused by a recent rename or migration.

Alternative or Verification Steps

  • After applying the fix, send a test message using PowerShell with New-MsmqQueue and Send-MsmqQueue (or your application’s built-in test/diagnostic tool) to confirm the destination resolves without triggering Error 1218.
  • If the issue persists, check Event Viewer → Applications and Services Logs → Microsoft → Windows → MSMQ for additional context, and consider fully uninstalling/reinstalling MSMQ via dism /online /disable-feature /featurename:MSMQ-Container followed by re-enabling it via DISM.