@@ -8,12 +8,12 @@ title: about Classes and DSC
88---
99# about_Classes_and_DSC
1010
11- ## SHORT DESCRIPTION
11+ ## Short description
1212
1313Describes how you can use classes to develop in PowerShell with Desired State
1414Configuration (DSC).
1515
16- ## LONG DESCRIPTION
16+ ## Long description
1717
1818Starting in Windows PowerShell 5.0, language was added to define classes and
1919other user-defined types, by using formal syntax and semantics that are
@@ -22,7 +22,7 @@ developers and IT professionals to embrace Windows PowerShell for a wider
2222range of use cases, simplify development of PowerShell artifacts such as DSC
2323resources, and accelerate coverage of management surfaces.
2424
25- ## SUPPORTED SCENARIOS
25+ ## Supported scenarios
2626
2727The following scenarios are supported:
2828
@@ -34,7 +34,7 @@ The following scenarios are supported:
3434- Generate and handle exceptions by using formal mechanisms, and at the right
3535 level.
3636
37- ## DEFINE DSC RESOURCES WITH CLASSES
37+ ## Define DSC resources with classes
3838
3939Apart from syntax changes, the major differences between a class-defined DSC
4040resource and a cmdlet DSC resource provider are the following items:
@@ -43,7 +43,7 @@ resource and a cmdlet DSC resource provider are the following items:
4343- A DSCResource subfolder in the module folder is not required.
4444- A PowerShell module file can contain multiple DSC resource classes.
4545
46- ## CREATE A CLASS-DEFINED DSC RESOURCE PROVIDER
46+ ## Create a class-defined DSC resource provider
4747
4848The following example is a class-defined DSC resource provider that is saved
4949as a module, MyDSCResource.psm1. You must always include a key property in a
@@ -246,7 +246,7 @@ class FileResource
246246}
247247```
248248
249- ## CREATE A MODULE MANIFEST
249+ ## Create a module manifest
250250
251251After creating the class-defined DSC resource provider, and saving it as a
252252module, create a module manifest for the module. To make a class-based
@@ -290,7 +290,7 @@ PowerShellVersion = '5.0'
290290}
291291```
292292
293- ## DEPLOY A DSC RESOURCE PROVIDER
293+ ## Deploy a DSC resource provider
294294
295295Deploy the new DSC resource provider by creating a MyDscResource folder in
296296` $pshome\Modules ` or ` $env:SystemDrive\ProgramFiles\WindowsPowerShell\Modules ` .
@@ -302,7 +302,7 @@ MyDscResource folder.
302302From this point, you create and run a configuration script as you would with
303303any DSC resource.
304304
305- ## CREATE A DSC CONFIGURATION SCRIPT
305+ ## Create a DSC configuration script
306306
307307After saving the class and manifest files in the folder structure as described
308308earlier, you can create a configuration that uses the new resource. The
@@ -336,7 +336,7 @@ configuration, in an elevated PowerShell console, run the following:
336336
337337` PS C:\test> .\MyResource.ps1 `
338338
339- ## INHERITANCE IN POWERSHELL CLASSES
339+ ## Inheritance in PowerShell classes
340340
341341### Declare base classes for PowerShell classes
342342
@@ -467,7 +467,7 @@ $list[0] # return 200
467467A limitation with class inheritance is that there is no syntax to declare
468468interfaces in PowerShell.
469469
470- ## DEFINING CUSTOM TYPES IN POWERSHELL
470+ ## Defining custom types in PowerShell
471471
472472Windows PowerShell 5.0 introduced several language elements.
473473
@@ -694,7 +694,7 @@ $v = bar
694694$v -eq $d # true
695695```
696696
697- ## EXAMPLE: CREATE CUSTOM CLASSES
697+ ## Example: Create custom classes
698698
699699The following example creates several new, custom classes to implement an HTML
700700Dynamic Stylesheet Language (DSL). The example adds helper functions to create
@@ -825,7 +825,7 @@ function Style
825825function Html ([HTML] $doc) { return $doc }
826826```
827827
828- ## SEE ALSO
828+ ## See also
829829
830830[ about_DesiredStateConfiguration] ( /powershell/module/Microsoft.PowerShell.Core/About/about_desiredstateconfiguration )
831831
0 commit comments