Last active
December 13, 2024 16:15
Revisions
-
tristian2 revised this gist
Dec 13, 2024 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ #In confluence watch out for page hierarchy Import-Module ConfluencePS $Username = '************@gmail.com' @@ -11,6 +11,6 @@ Get-ConfluenceSpace #https://***********.atlassian.net/wiki/spaces/~712020e628e2b3818645efb1b64e5371f102bc/pages/294914/page+1 Get-ConfluencePage -PageID 294914 | Format-List * #get page info including content #get space key from its url $pages = Get-ConfluencePage -SpaceKey "~712020e628e2b3818645efb1b64e5371f102bc" $pages | ForEach-Object { $_.Body } #gets page content as HTML -
tristian2 created this gist
Dec 11, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ In confluence watch out for page hierarchy Import-Module ConfluencePS $Username = '************@gmail.com' #generate a key from here https://id.atlassian.com/manage-profile/security/api-tokens $Key = '******************************************' ` | ConvertTo-SecureString -AsPlainText -Force $Credentials = New-Object System.Management.Automation.PsCredential($Username,$Key) #Set-ConfluenceInfo -BaseURI 'https://********.atlassian.net/wiki' -Credential $Credentials Get-ConfluenceSpace #https://***********.atlassian.net/wiki/spaces/~712020e628e2b3818645efb1b64e5371f102bc/pages/294914/page+1 Get-ConfluencePage -PageID 294914 | Format-List * #get page info including content #get space ley from it's url $pages = Get-ConfluencePage -SpaceKey "~712020e628e2b3818645efb1b64e5371f102bc" $pages | ForEach-Object { $_.Body } #gets page content as HTML