Skip to content

New DscResourceWikiPage

dscbot edited this page May 29, 2024 · 3 revisions

New-DscResourceWikiPage

SYNOPSIS

New-DscResourceWikiPage generates wiki pages that can be uploaded to GitHub to use as public documentation for a module.

SYNTAX

New-DscResourceWikiPage [-OutputPath] <String> [-SourcePath] <String> [-BuiltModulePath] <String>
 [[-Metadata] <Hashtable>] [-Force] [<CommonParameters>]

DESCRIPTION

The New-DscResourceWikiPage cmdlet will review all of the MOF-based, class-based and composite resources in a specified module directory and will output the Markdown files to the specified directory. These help files include details on the property types for each resource, as well as a text description and examples where they exist.

Generate documentation that can be manually uploaded to the GitHub repository Wiki.

It is possible to use markdown code in the schema MOF parameter descriptions. If markdown code is used and conceptual help is also to be generated, configure the task Generate_Conceptual_Help to parse the markdown code. See the cmdlet New-DscResourcePowerShellHelp and the task Generate_Conceptual_Help for more information.

EXAMPLES

EXAMPLE 1

New-DscResourceWikiPage `
    -SourcePath C:\repos\MyResource\source `
    -BuiltModulePath C:\repos\MyResource\output\MyResource\1.0.0 `
    -OutputPath C:\repos\MyResource\output\WikiContent

This example shows how to generate wiki documentation for a specific module.

EXAMPLE 2

New-DscResourceWikiPage `
    -SourcePath C:\repos\MyResource\source `
    -BuiltModulePath C:\repos\MyResource\output\MyResource\1.0.0 `
    -OutputPath C:\repos\MyResource\output\WikiContent `
    -Metadata @{
        MofResourceMetadata = @{
            Type = 'MofResource'
            Category = 'MOF-based resources'
        }
        ClassResourceMetadata = @{
            Type = 'ClassResource'
            Category = 'Class-based resources'
        }
        CompositeResourceMetadata = @{
            Type = 'CompositeResource'
            Category = 'Composites resources'
        }
    }

This example shows how to generate wiki documentation for a specific module and passing in metadata for the markdown files.

PARAMETERS

-BuiltModulePath

The path to the root of the built DSC resource module, e.g. 'output/MyResource/1.0.0'.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force

Overwrites any existing file when outputting the generated content.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Metadata

The metadata for the DSC resource markdown files.

Type: Hashtable
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputPath

Where should the files be saved to.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourcePath

The path to the root of the DSC resource module (where the PSD1 file is found, not the folder for and individual DSC resource).

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

RELATED LINKS