< Back

ConvertTo-ConfluenceStorageFormat

Mon Jan 13, 2020 4:27 am

NAME ConvertTo-ConfluenceStorageFormat



SYNOPSIS

Convert your content to Confluence's storage format.





SYNTAX

ConvertTo-StorageFormat [-Content] <String[]> -ApiUri <Uri> [-Credential <PSCredential>] [-Certificate

<X509Certificate>] [<CommonParameters>]





DESCRIPTION

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.





PARAMETERS

-ApiUri <Uri>

The URi of the API interface. Value can be set persistently with Set-ConfluenceInfo.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Credential <PSCredential>

Confluence's credentials for authentication. Value can be set persistently with Set-ConfluenceInfo.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Certificate <X509Certificate>

Certificate for authentication.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Content <String[]>

A string (in plain text and/or wiki markup) to be converted to storage format.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.String







NOTES









-------------------------- EXAMPLE 1 --------------------------



$Body = ConvertTo-ConfluenceStorageFormat -Content 'Hello world!'



Stores the returned value '<p>Hello world!</p>' in $Body for use in New-ConfluencePage/Set-ConfluencePage/etc.

-------------------------- EXAMPLE 2 --------------------------



Get-Date -Format s | ConvertTo-ConfluenceStorageFormat



Pipe the current date/time in sortable format, returning the converted string.



RELATED LINKS

Online Version: https://atlassianps.org/docs/Confluence ... ageFormat/

https://github.com/AtlassianPS/ConfluencePS https://github.com/AtlassianPS/ConfluencePS

Confluence Storage Format https://confluence.atlassian.com/confcl ... 65084.html