Search Results for

    Show / Hide Table of Contents

    Set-PnPWikiPageContent

    SYNOPSIS

    Sets the contents of a wikipage

    SYNTAX

    STRING

    Set-PnPWikiPageContent -Content <String> -ServerRelativePageUrl <String> 
     [-Connection <PnPConnection>] 
    

    FILE

    Set-PnPWikiPageContent -Path <String> -ServerRelativePageUrl <String> 
     [-Connection <PnPConnection>] 
    

    DESCRIPTION

    This cmdlet updates the content of the specified wikipage to the value specified either in a string or a file.

    EXAMPLES

    EXAMPLE 1

    Set-PnPWikiPageContent -ServerRelativePageUrl /sites/PnPWikiCollection/SitePages/OurWikiPage.aspx -Path .\sampleblog.html
    

    Sets the content of OurWikiPage to the content of sampleblog.html file.

    EXAMPLE 2

    $htmlContent = "<div>test</div>"
    Set-PnPWikiPageContent -ServerRelativePageUrl /sites/PnPWikiCollection/SitePages/OurWikiPage.aspx -Content $htmlContent
    

    Sets the content of OurWikiPage as "test".

    PARAMETERS

    -Connection

    Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

    Type: PnPConnection
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Content

    Type: String
    Parameter Sets: STRING
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Path

    Type: String
    Parameter Sets: FILE
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -ServerRelativePageUrl

    Site Relative Page Url

    Type: String
    Parameter Sets: (All)
    Aliases: PageUrl
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    RELATED LINKS

    Microsoft 365 Patterns and Practices

    Back to top Generated by DocFX spacer