Last active
December 13, 2024 16:15
-
-
Save tristian2/c33692cbe46e287dd4f9bd5bb887ddb5 to your computer and use it in GitHub Desktop.
ConfluencePS for SharePoint Migration Starter
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 characters
#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 key from its url | |
$pages = Get-ConfluencePage -SpaceKey "~712020e628e2b3818645efb1b64e5371f102bc" | |
$pages | ForEach-Object { $_.Body } #gets page content as HTML |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment