forked from dsccommunity/SqlServerDsc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
3-RemoveEndpoint.ps1
39 lines (31 loc) · 894 Bytes
/
3-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
<#
.EXAMPLE
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
{
SqlServerEndpoint SQLConfigureEndpoint-Instance1
{
Ensure = 'Absent'
EndpointName = 'HADR'
InstanceName = 'INST1'
PsDscRunAsCredential = $SqlAdministratorCredential
}
SqlServerEndpoint SQLConfigureEndpoint-Instance2
{
Ensure = 'Absent'
EndpointName = 'HADR'
InstanceName = 'INST2'
PsDscRunAsCredential = $SqlAdministratorCredential
}
}
}