Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8330941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:16:29+00:00 2026-06-09T02:16:29+00:00

Is it possible to purge a msmq queue from a bat file? Essentially I

  • 0

Is it possible to purge a msmq queue from a bat file?

Essentially I want to make a bat file or at least something quick and easy so that an untrained employee can click and fix without knowing any shell or admin tools

Could someone please help me in the right direction?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T02:16:31+00:00Added an answer on June 9, 2026 at 2:16 am

    Take a look on MSMQAdm Utility

    Tasks administered through the utility programs include the following:

    • Browsing local queues
    • Purging messages
    • Deleting individual messages
    • Stopping and starting MSMQ service
    • Connecting and disconnecting from the network

    Don’t forget about powershell, take a look on PowerShell Community Extensions

    Update

    Open powershell and write line by line

    [Reflection.Assembly]::LoadWithPartialName("System.Messaging")
    $queueName = '.\Private$\testQueue'
    $queue = new-object -TypeName System.Messaging.MessageQueue -ArgumentList $queueName
    $queue.Purge()
    

    Call powershell from cmd

    1. Create txt file.
    2. Insert all lines
    3. Change file extension on “ps1”

    The easiest way call script from cmd.

    powershell.exe -executionpolicy Unrestricted C:\purgemsmq.ps1

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How to purge a huge file from commits history in Git? I
Is it possible to access the Data Purge Tool from the Valence API?
Is it possible to purge a ThreadPool? Remove items from the ThreadPool? Anything like
Possible Duplicate: How do i purge the contents of a text file in php
I want to know if it is possible to purge the level 1 cache
Is it possible to make a div 50px less than 100% in pure CSS?
Possible Duplicate: How do I make a request using HTTP basic authentication with PHP
Possible Duplicate: How can I convert a list<> to a multi-dimensional array? I want
Possible Duplicate: How to do the vector of sets in C++? I want to
Is it possible to post to a form from pure code behind in ASP.NET?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.