It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Looking for powershell scipt to upload file to Confluence Page.

I have utilized below command to upload the file to confluence page. Unable to do that.

Add-ConfluenceAttachment -ApiUri <Uri> -Credential <PSCredential> [[-PageID] <Int32>] -FilePath <String> [-WhatIf] [-Confirm]


I think if i have to upload anything to Confluence we need below things :

1. Authenticate to confluence page 

2. Upload the content to confluence


Can someone share me powershell script  to do this.


When we say confluence page is it he URL which we see in tab :

For example :



1 answer

0 votes

Hello Suryakant,

From my understanding, the command you were using was working, and now it is not. Is this correct

If you are on Confluence Cloud, it could be that you haven't switched over to the API token-based authentication. Instead of username and password,  you should use an email address plus the token.

For more details, have a look at Deprecation notice - Basic authentication with passwords and cookie-based authentication. It mentions Jira here but applies to all Cloud sites.

Let me know if you have any questions about that.



Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

How is your team having fun and bonding, remotely, utilizing Confluence?

Thanks everyone for answering last week’s question. The winner of the random drawing from those who commented is: @LarryBrock I’ll contact you separately with your prize details. This wee...

283 views 9 7
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you