Convert your content to Confluence’s storage format.
ConvertTo-ConfluenceStorageFormat -ApiUri <Uri> [-Credential <PSCredential>]
[-PersonalAccessToken <String>] [-Certificate <X509Certificate>] [-Content] <String[]>
[-AsPlainText]
To properly create/edit pages, content should be in the proper “XHTML-based” format. Invokes a POST call to convert from a “wiki” representation, receiving a “storage” response.
$Body = ConvertTo-ConfluenceStorageFormat -Content 'Hello world!'
Stores the returned value ‘<p>Hello world!</p>’ in $Body for use in New-ConfluencePage/Set-ConfluencePage/etc.
Get-Date -Format s | ConvertTo-ConfluenceStorageFormat
Pipe the current date/time in sortable format, returning the converted string.
$Body = ConvertTo-ConfluenceStorageFormat -Content 'Use @{ Name = "Value" } in PowerShell.' -AsPlainText
Entity-encodes the content before conversion so Confluence treats wiki markup characters as literal text instead of converting them to mentions, links, or macros.
The URi of the API interface. Value can be set persistently with Set-ConfluenceInfo.
Type: Uri
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Confluence’s credentials for authentication. Value can be set persistently with Set-ConfluenceInfo.
Type: PSCredential
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Confluence’s Personal Access Token for authentication. Value can be set persistently with Set-ConfluenceInfo.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Certificate for authentication.
Type: X509Certificate
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A string (in plain text and/or wiki markup) to be converted to storage format.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Entity-encodes the content before conversion so Confluence treats wiki markup characters as literal text.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False