en-US/about_AzDoWikiPage.help.txt

.NAME
    AzDoWikiPage
 
.SYNOPSIS
    DSC resource for managing the content and ordering of an Azure DevOps wiki page.
 
.DESCRIPTION
    Manages a single page within an existing project wiki: its Markdown content and its position
    among its sibling pages. AzDoWiki manages the wiki itself; this resource manages a page inside
    one.
 
    Only project wikis are supported. A code wiki's content lives in a Git branch, so writing a
    page there is a commit rather than a configuration change, and can conflict with an open pull
    request against that branch. Pointing this resource at a code wiki is refused.
 
.PARAMETER ProjectName
    Required - System.String
    The name of the Azure DevOps project.
 
.PARAMETER WikiName
    Required - System.String
    The name of the wiki that contains this page. Resolved via the 'LiveWikis' cache, the same way
    AzDoWiki resolves it. Only a project wiki (WikiType 'projectWiki') is supported.
 
.PARAMETER Path
    Key - System.String
    The full path of the wiki page, for example '/Runbooks/On-call'. This is the resource key.
    The parent page ('/Runbooks' here) must already exist - declare it as its own AzDoWikiPage.
 
.PARAMETER Content
    Write - System.String
    The page's Markdown content. Mutually exclusive with ContentPath.
 
.PARAMETER ContentPath
    Write - System.String
    A local file to read the page's Markdown content from. Keeps large pages out of the
    configuration itself. Mutually exclusive with Content.
 
.PARAMETER Order
    Write - System.Int32
    The page's desired position among its sibling pages. Left unspecified, the page's order is
    never compared or changed.
 
.PARAMETER AllowRecursiveDelete
    Write - System.Boolean
    Deleting a wiki page deletes every sub-page beneath it. Removal of a page that still has
    sub-pages is refused unless this is set to $true.
 
.EXAMPLE 1
 
This example shows how to create a wiki page with inline Markdown content in an
existing project wiki.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoWikiPage 'AddAzDoWikiPage'
        {
            Ensure = 'Present'
            ProjectName = 'MyProject'
            WikiName = 'MyProjectWiki'
            Path = '/Runbooks/On-call'
            Content = "# On-call`n`nCall the on-call engineer."
        }
    }
}
 
.EXAMPLE 2
 
This example shows how to update a wiki page's content from a local file and set its
position among its sibling pages.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoWikiPage 'UpdateAzDoWikiPage'
        {
            Ensure = 'Present'
            ProjectName = 'MyProject'
            WikiName = 'MyProjectWiki'
            Path = '/Runbooks/On-call'
            ContentPath = 'C:\Docs\OnCallRunbook.md'
            Order = 0
        }
    }
}
 
.EXAMPLE 3
 
This example shows how to remove a wiki page. Removing a page that still has sub-pages
is refused unless AllowRecursiveDelete is set, since removal deletes them too.
 
Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'
 
    node localhost
    {
        AzDoWikiPage 'RemoveAzDoWikiPage'
        {
            Ensure = 'Absent'
            ProjectName = 'MyProject'
            WikiName = 'MyProjectWiki'
            Path = '/Runbooks'
            AllowRecursiveDelete = $true
        }
    }
}