Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CAP
Commits
1430fd13
Commit
1430fd13
authored
Jun 28, 2017
by
yangxiaodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed encode
parent
1fef4110
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
ConfigureMSDTC.ps1
ConfigureMSDTC.ps1
+20
-20
No files found.
ConfigureMSDTC.ps1
View file @
1430fd13
#
————————————
#
# Enable MSDTC
#
————————————
#
Write-Host
"Enabling MSDTC..."
-ForegroundColor Yellow
$DTCSecurity
=
"Incoming"
...
...
@@ -10,31 +10,31 @@ $RegPath = "HKLM:\SOFTWARE\Microsoft\MSDTC\"
$RegSecurityPath
=
"
$RegPath
\Security"
Set-ItemProperty
–path
$RegSecurityPath
–name
"NetworkDtcAccess"
–
value 1
Set-ItemProperty
–path
$RegSecurityPath
–name
"NetworkDtcAccessClients"
–
value 1
Set-ItemProperty
–path
$RegSecurityPath
–name
"NetworkDtcAccessTransactions"
–
value 1
Set-ItemProperty
–path
$RegSecurityPath
–name
"NetworkDtcAccessInbound"
–
value 1
Set-ItemProperty
–path
$RegSecurityPath
–name
"NetworkDtcAccessOutbound"
–
value 1
Set-ItemProperty
–path
$RegSecurityPath
–name
"LuTransactions"
–
value 1
Set-ItemProperty
path
$RegSecurityPath
name
"NetworkDtcAccess"
value 1
Set-ItemProperty
path
$RegSecurityPath
name
"NetworkDtcAccessClients"
value 1
Set-ItemProperty
path
$RegSecurityPath
name
"NetworkDtcAccessTransactions"
value 1
Set-ItemProperty
path
$RegSecurityPath
name
"NetworkDtcAccessInbound"
value 1
Set-ItemProperty
path
$RegSecurityPath
name
"NetworkDtcAccessOutbound"
value 1
Set-ItemProperty
path
$RegSecurityPath
name
"LuTransactions"
value 1
if
(
$DTCSecurity
–
eq
"None"
)
if
(
$DTCSecurity
eq
"None"
)
{
Set-ItemProperty
–path
$RegPath
–name
"TurnOffRpcSecurity"
–
value 1
Set-ItemProperty
–path
$RegPath
–name
"AllowOnlySecureRpcCalls"
–
value 0
Set-ItemProperty
–path
$RegPath
–name
"FallbackToUnsecureRPCIfNecessary"
–
value 0
Set-ItemProperty
path
$RegPath
name
"TurnOffRpcSecurity"
value 1
Set-ItemProperty
path
$RegPath
name
"AllowOnlySecureRpcCalls"
value 0
Set-ItemProperty
path
$RegPath
name
"FallbackToUnsecureRPCIfNecessary"
value 0
}
elseif
(
$DTCSecurity
–
eq
"Incoming"
)
elseif
(
$DTCSecurity
eq
"Incoming"
)
{
Set-ItemProperty
–path
$RegPath
–name
"TurnOffRpcSecurity"
–
value 0
Set-ItemProperty
–path
$RegPath
–name
"AllowOnlySecureRpcCalls"
–
value 0
Set-ItemProperty
–path
$RegPath
–name
"FallbackToUnsecureRPCIfNecessary"
–
value 1
Set-ItemProperty
path
$RegPath
name
"TurnOffRpcSecurity"
value 0
Set-ItemProperty
path
$RegPath
name
"AllowOnlySecureRpcCalls"
value 0
Set-ItemProperty
path
$RegPath
name
"FallbackToUnsecureRPCIfNecessary"
value 1
}
else
{
Set-ItemProperty
–path
$RegPath
–name
"TurnOffRpcSecurity"
–
value 0
Set-ItemProperty
–path
$RegPath
–name
"AllowOnlySecureRpcCalls"
–
value 1
Set-ItemProperty
–path
$RegPath
–name
"FallbackToUnsecureRPCIfNecessary"
–
value 0
Set-ItemProperty
path
$RegPath
name
"TurnOffRpcSecurity"
value 0
Set-ItemProperty
path
$RegPath
name
"AllowOnlySecureRpcCalls"
value 1
Set-ItemProperty
path
$RegPath
name
"FallbackToUnsecureRPCIfNecessary"
value 0
}
Restart-Service
MSDTC
Write-Host
"
——MSDTC has been configured—–"
–
foregroundcolor green
Write-Host
"
MSDTC has been configured"
foregroundcolor green
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment