Hug*_*rte 6 powershell batch-file msmq
有没有办法通过批处理或powershell脚本来做到这一点?我正在寻找一种方法来设置几个新服务器。
我在这个主题上发现的唯一一件事让我相信你不能:来自:http : //technet.microsoft.com/en-us/library/cc785060.aspx
只能使用计算机管理、服务和应用程序、消息队列属性中的存储选项卡修改消息存储位置。
编辑 - 我也找到了这篇文章。它列出了一些注册表值,但再次建议不要使用它 http://blogs.msdn.com/b/johnbreakwell/archive/2009/02/09/changed-the-msmq-storage-location.aspx
$Location = 'E:\msmq\storage'
If(!(test-path $Location))
{
New-Item -ItemType Directory -Force -Path $Location
}
takeown /F $Location /R /D y #this should give me ownership of both msmq and LQS folder
icacls $Location /reset /T /C
icacls $Location "/grant:r" "NT AUTHORITY\NetworkService:(OI)(CI)(M)" /T /C
$ConfirmPreference = 'None'
Set-MsmqQueueManager -MsgStore $Location -TransactionLogStore $Location -MsgLogStore $Location
Start-Service MSMQ
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1254 次 |
| 最近记录: |