@@ -12,26 +12,54 @@ Please check out common DSC Community [contributing guidelines](https://dsccommu
12
12
13
13
## Change log
14
14
15
- A full list of changes in each version can be found in the [ change log ] ( CHANGELOG.md ) .
15
+ A full list of changes in each version can be found in the [ Releases ] ( https://github.com/xoap-io/XOAPModuleTemplateDSC/releases ) .
16
16
17
17
## Documentation
18
18
19
19
This script is used to easily create new DSC modules and resources.
20
20
21
21
## Prerequisites
22
22
23
- Please install Plaster first and make sure it's present.
23
+ Be sure that the following DSC modules are installed on your system:
24
24
25
- ``` powershell
26
- Install-Module Plaster
27
- Import-Module Plaster
25
+ - ModuleName (x.x.x)
26
+
27
+ ## DSC Resources and syntax
28
+
29
+ ### XOAP_AddServerToCollection
30
+
31
+ ``` PowerShell
32
+ XOAP_DSCResource [String] #ResourceName
33
+ {
34
+ [DependsOn = [String[]]]
35
+ [PsDscRunAsCredential = [PSCredential]]
36
+ }
28
37
```
29
38
30
- ## Create new DSC modules
39
+ ## Configuration examples for each resource
31
40
32
- Modules will be automatically created once you are creating a new DSC resource.
41
+ You can review the [ Examples] ( /Examples/Resources ) directory in the ** XOAPModuleTemplateDSC** module
42
+ for some general usage scenarios for all the resources that are in the module.
43
+
44
+ To implement the Module Template DSC module, add the following resources to your DSC configuration and adjust the parameters accordingly:
45
+
46
+ ### Add server to a collection
47
+
48
+ ``` PowerShell
49
+ configuration 'XOAP_DSCResource'
50
+ {
51
+ Import-DscResource -ModuleName 'XOAPModuleTemplateDSC' -Name 'XOAP_DSCResource' -ModuleVersion '0.0.1'
52
+
53
+ XOAP_DSCResource 'Example'
54
+ {
55
+ DependsOn = @('[String[]]')
56
+ PsDscRunAsCredential = [PSCredential]
57
+ }
58
+ }
59
+ XOAP_DSCResource
60
+ ```
33
61
34
- ## Create new DSC resources
62
+ ## Create new DSC resource
35
63
36
64
DSC resources can easily be deployed via the invocation of
37
65
@@ -42,18 +70,5 @@ DSC resources can easily be deployed via the invocation of
42
70
with parameters
43
71
44
72
``` powershell
45
- .\New-CompositeResource.ps1 -Module XOAPModuleTemplateDSC -Version 0.0.1 -Resource ScheduledTasks
73
+ .\New-CompositeResource.ps1 -Module ' XOAPModuleTemplateDSC' -Version ' 0.0.1' -Resource 'DSCResource'
46
74
```
47
-
48
- The parameter list is as followed:
49
-
50
- | Parameter | Description | Note |
51
- | -----------| ----------------------------------------| ------|
52
- | Module | Name of the outer module part | - |
53
- | Version | Target version of the module | - |
54
- | Ressource | The name of the ressource /config part | - |
55
-
56
- ### Examples
57
-
58
- You can review the [ Examples] ( /Examples/Resources ) directory in the ** XOAPModuleTemplateDSC** module
59
- for some general use scenarios for all the resources that are in the module.
0 commit comments