0

I am trying to remove / uncheck the Msmq Message and Journal Quota limitation in 2008 R2 via the Powershell script.

enter image description here

I've got the following script working on my machine (Windows 10). But it's not working on any of our server at all (which are 2008 R2 servers). It does not show any error too.

#Set the value for unchecked (hex or decima)
Set-ItemProperty -Path HKLM:\Software\Microsoft\MSMQ\Parameters\MachineCache -Name MachineQuota -Value 4294967295
Set-ItemProperty -Path HKLM:\Software\Microsoft\MSMQ\Parameters\MachineCache -Name MachineJournalQuota -Value 4294967295

#IMP-Restart the MSMQ services for changes to take effect
Get-Service MSMQ | Restart-Service -Force

I tried to manually change the value in the Registry with Regedit tool. But whenever I restarted the MSMQ (Message Queuing) service, it always change it back to the original value '1048576'

I tried to execute Octopus deployment which runs the script with 'Local System Account', but still no luck and it does not remove the Storage limits and shows no error.

Do you have to be an administrator or highest role to remove it?

Could you please suggest me how I could remove that limitation via Powershell?

TTCG
  • 8,805
  • 31
  • 93
  • 141
  • "I tried to manually change the value in the Registry with Regedit tool. But whenever I restarted the MSMQ (Message Queuing) service, it always change it back to the original value '1048576'" Can you manually update the number at all while keeping the tick box ticked? – John Breakwell Apr 26 '18 at 09:39
  • Nope, I can't. I keep getting the Access Denied error. – TTCG Apr 26 '18 at 10:32

1 Answers1

0

I can manually set MachineQuota and MachineJournalQuota through Computer Management without a problem and restarting MSMQ leaves them unchanged.

If you are getting 'Access Denied' then check the permissions on the MachineCache key. On my Windows 10 machine, Full Control is given to SYSTEM, Administrators and MSMQ. So running a script under the local system account should work. Maybe your permissions are different for some reason.

John Breakwell
  • 4,667
  • 20
  • 25