Powershell script to list onedrive files with embed code

MINA LOUIS 1 Reputation point
2020-09-05T09:42:41.98+00:00

Hi,
I have OneDrive account. I uploaded lots of PDF files to it.
Now, on each one, I right click on the pdf file and generate embed code. This code I copy to a website to show the pdf on the page.

22737-onedrive-embed-code.png

My request here is to PowerShell script the following:

  • list all file names in the folder
  • generate the embed code for each one.

Out put that is a output file:
file name | code for this file

It would be better this output file to be csv file so that I can read it later on. But any file would do at this time as each file embed code takes a lot of time to generate.

Anyone can help???

Community Center Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Hua-MSFT 27,796 Reputation points
    2020-09-08T07:16:48.42+00:00

    @MINA LOUIS ,

    We are mainly responsible for general issues of Office desktop applications, but your question seems to be more related to Powershell Script, it is out of our support
    I would change the tag to be "not-supported". Thanks for your understanding..

    It's recommended to post a new question into the forums below. Maybe you could get some helpful suggestions.
    The Official Scripting Guys Forum!


    If an 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.

    0 comments No comments

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.