-
Notifications
You must be signed in to change notification settings - Fork 1
/
SamplePullConfig.ps1
57 lines (40 loc) · 1.16 KB
/
SamplePullConfig.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
52
53
54
55
56
57
#requires -version 4.0
Configuration DemoPullConfig {
Param([string[]]$Computername)
Import-DscResource -moduleName PSDesiredStateConfiguration,
@{ModuleName='xNetworking';RequiredVersion = '5.2.0.0'},
@{ModuleName='xTimeZone';RequiredVersion = '1.6.0.0'},
@{ModuleName='xSMBShare';RequiredVersion = '2.0.0.0'}
Node $Computername {
xTimeZone Eastern {
TimeZone = "Central Standard Time"
IsSingleInstance = "Yes"
} #end xTimeZone
File Stuff {
DestinationPath = "C:\Stuff"
Ensure = "Present"
Force = $True
Type = "Directory"
} #end File resource
xSMBShare Stuff {
Name = "Stuff$"
Path = "c:\stuff"
Description = "company stuff"
Ensure = 'Present'
FolderEnumerationMode = 'AccessBased'
FullAccess = "company\domain admins"
DependsOn = "[file]Stuff"
}
xDnsServerAddress CompanyDNS {
Address = "192.168.3.10","8.8.8.8"
InterfaceAlias = "Ethernet"
AddressFamily = "IPv4"
} #end DNSServer resource
WindowsFeature SNMP {
Name = "SNMP-Service"
Ensure = 'Present'
IncludeAllSubFeature = $True
}
} #end node
} #close configuration
DemoPullConfig -Computername SRV3 -OutputPath c:\dsc\DemoPullConfig