forked from bgelens/cWAPack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSampleConfig.ps1
More file actions
73 lines (67 loc) · 2.05 KB
/
SampleConfig.ps1
File metadata and controls
73 lines (67 loc) · 2.05 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#New Deployment
configuration WAPVMRole {
Import-DscResource -ModuleName cWAPack
node 'localhost' {
WAPackVMRole DSCClient {
VMSize = 'Medium'
Name = 'TestDSC'
SubscriptionId = 'b5a9b263-066b-4a8f-87b4-1b7c90a5bcad'
URL = 'https://api.bgelens.nl'
Credential = Get-Credential
VMRoleName = 'DSCPullServerClient'
OSDiskSearch = 'LatestApplicable'
NetworkReference = 'Internal'
TokenSource = 'ADFS'
TokenURL = 'https://sts.bgelens.nl'
TokenPort = 443
Ensure = 'Present'
Port = 443
VMRoleParameters = @{
VMRoleAdminCredential = 'Administrator:P@$Sw0rd!'
DSCPullServerClientConfigurationId = '7844f909-1f2e-4770-9c97-7a2e2e5677ae'
DSCPullServerClientCredential = 'Domain\certreq:Password!'
}
}
}
}
$configdata = @{
AllNodes = @(
@{
NodeName = 'localhost'
PSDscAllowPlainTextPassword = $true
}
)
}
WAPVMRole -ConfigurationData $configdata
Start-DscConfiguration .\WAPVMRole -Wait -Verbose
#Remove VM Role
configuration WAPVMRolepurge {
Import-DscResource -ModuleName cWAPack
node 'localhost' {
WAPackVMRole DSCClient {
Name = 'TestDSC'
SubscriptionId = 'b5a9b263-066b-4a8f-87b4-1b7c90a5bcad'
URL = 'https://api.bgelens.nl'
Credential = Get-Credential
TokenSource = 'ADFS'
TokenURL = 'https://sts.bgelens.nl'
TokenPort = 443
Ensure = 'Absent'
Port = 443
VMRoleName = 'DSCPullServerClient'
OSDiskSearch = 'LatestApplicable'
VMSize = 'Medium'
NetworkReference = 'Internal'
}
}
}
$configdata = @{
AllNodes = @(
@{
NodeName = 'localhost'
PSDscAllowPlainTextPassword = $true
}
)
}
WAPVMRolepurge -ConfigurationData $configdata
Start-DscConfiguration .\WAPVMRolepurge -Wait -Verbose