forked from dsccommunity/SqlServerDsc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2-RemoveLogin.ps1
More file actions
44 lines (38 loc) · 1.13 KB
/
2-RemoveLogin.ps1
File metadata and controls
44 lines (38 loc) · 1.13 KB
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
41
42
43
44
<#
.EXAMPLE
This example shows how to remove the Windows user 'CONTOSO\WindowsUser'.
.EXAMPLE
This example shows how to remove Windows group 'CONTOSO\WindowsGroup'.
.EXAMPLE
This example shows how to remove the SQL Login 'SqlLogin'.
#>
Configuration Example
{
Import-DscResource -ModuleName SqlServerDsc
node localhost {
SqlServerLogin Remove_WindowsUser
{
Ensure = 'Absent'
Name = 'CONTOSO\WindowsUser'
LoginType = 'WindowsUser'
ServerName = 'TestServer.company.local'
InstanceName = 'DSC'
}
SqlServerLogin Remove_WindowsGroup
{
Ensure = 'Absent'
Name = 'CONTOSO\WindowsGroup'
LoginType = 'WindowsGroup'
ServerName = 'TestServer.company.local'
InstanceName = 'DSC'
}
SqlServerLogin Remove_SqlLogin
{
Ensure = 'Absent'
Name = 'SqlLogin'
LoginType = 'SqlLogin'
ServerName = 'TestServer.company.local'
InstanceName = 'DSC'
}
}
}