Is there a PowerShell script to edit a document on SharePoint online, so we replace $string1 with $string2?

asked 2022-06-29T23:57:47.277+00:00
frob 3,826 Reputation points

Hi there

Is there a PowerShell script to edit a document on SharePoint online, so we replace $string1 with $string2?
The document can be an Office document or a text file or a PDF.

Thank you.

A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
5,968 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
4,606 questions
No comments
{count} votes

Accepted answer
  1. answered 2022-06-30T01:51:07.957+00:00
    David Broggy 3,981 Reputation points Microsoft MVP

    Hi @frob ,
    I would suggest using Power Automate.
    There are a lot of search/replace functions available.
    Here's a quick example, but a google search will bring up much more.

    Hope that helps.

    No comments

1 additional answer

Sort by: Most helpful
  1. answered 2022-07-01T10:10:15.76+00:00
    Yanli Jiang - MSFT 5,971 Reputation points Microsoft Employee

    Hi @frob ,
    According to your description, your requirement is more related to the "Get File Content" action of Power Automate. Therefore, we suggest that you can go to the Microsoft Power Automate Community for professional help.
    Thank you for your support and understanding.

    Yanli Jiang


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.

    No comments