forked from dsccommunity/SqlServerDsc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
4-RemoveEndpoint.ps1
40 lines (33 loc) · 1007 Bytes
/
4-RemoveEndpoint.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<#
.DESCRIPTION
This example will remove an Database Mirror endpoint from two instances.
#>
Configuration Example
{
param
(
[Parameter(Mandatory = $true)]
[System.Management.Automation.PSCredential]
$SqlAdministratorCredential
)
Import-DscResource -ModuleName 'SqlServerDsc'
node localhost
{
SqlEndpoint 'SQLConfigureEndpoint-Instance1'
{
Ensure = 'Absent'
EndpointName = 'HADR'
EndpointType = 'DatabaseMirroring'
InstanceName = 'INST1'
PsDscRunAsCredential = $SqlAdministratorCredential
}
SqlEndpoint 'SQLConfigureEndpoint-Instance2'
{
Ensure = 'Absent'
EndpointName = 'HADR'
EndpointType = 'DatabaseMirroring'
InstanceName = 'INST2'
PsDscRunAsCredential = $SqlAdministratorCredential
}
}
}