-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClientLCMConfig.ps1
51 lines (46 loc) · 1.72 KB
/
ClientLCMConfig.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
41
42
43
44
45
46
47
48
49
50
51
[DscLocalConfigurationManager()]
Configuration ClientLCMConfig
{
param
(
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[guid]$RegistrationKey
)
Node localhost
{
Settings
{
RefreshFrequencyMins = 30;
RefreshMode = "PULL";
ConfigurationMode = "ApplyAndAutocorrect";
AllowModuleOverwrite = $true;
RebootNodeIfNeeded = $false;
ConfigurationModeFrequencyMins = 60;
}
ConfigurationRepositoryWeb Lab-PullSrv
{
ServerURL = 'https://dscpull.testlab.myorg:8080/PSDSCPullServer.svc'
RegistrationKey = $RegistrationKey
ConfigurationNames = @(
"Base",
"Extra"
)
}
PartialConfiguration Base
{
Description = "Base configuration"
ConfigurationSource = @("[ConfigurationRepositoryWeb]Lab-PullSrv")
}
PartialConfiguration Extra
{
Description = "Extra configuration"
ConfigurationSource = @("[ConfigurationRepositoryWeb]Lab-PullSrv")
DependsOn = '[PartialConfiguration]Base'
}
}
}
[guid]$RegistrationKey = '' #Enter Reg Key
# Generate MOF
New-Item -Path 'D:\PSDSC' -ItemType Directory -Force
StandardClientConfiguration -OutputPath 'D:\PSDSC' -RegistrationKey $RegistrationKey -Verbose