Send file to Teamschannel with Powershell

Alex_Ma 1 Reputation point
2021-03-31T14:13:49.927+00:00

Hello people.

Is there a way to send a files from PowerShell to a Teamchannel?

The following conditions have to be given:

  • Sending it via PowerShell Script
  • The file that arrives at the Teamschannel always has to have the same name (I will update the content of the file and send it regularly to the Teamschannel) -> overwriting existing file (this excludes a possible solution via mail)
    • The file always has to get saved at the same position in Sharepoint (this also excludes a possible solution via mail aswell)

(What I am actually trying to do:
I am creating an csv export on a server. This Export is needed for a PowerBI report which is why the name and saving path has to stay the same the entire time AND
has to be at a path that PowerBI has access to. This would be Sharepoint in my case since files shared in Teams are getting saved there.)

Windows for business Windows Server User experience PowerShell
Microsoft Teams Microsoft Teams for business Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2021-04-01T05:54:40.68+00:00

    Hi @Alex_Ma ,

    As your issue is related to Teams, please add the Teams tag for better support.
    Hope this link could be helpful.
    https://childebrandt42.wordpress.com/2020/07/14/using-powershell-to-automate-file-adds-to-teams-and-sharepoint-online/
    Tip: This answer contains the content of a third-party website. Microsoft makes no representations about the content of these websites. We provide this content only for your convenience.

    Best Regards,
    Ian Xue

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.