What’s on our mind?

Exsilio Solutions is proud to introduce our new blog! Not only is this forum completely integrated with all our social networks, but it is also 100% responsive. Now, you can take Exsilio with you on your phone, tablet, and desktop - redefine what you thought possible!

How to Use Powershell or SSIS to Download a Sharepoint File

Here’s how to download and access a Sharepoint file via Powershell or SSIS.

Information Required for Access:

  • URL of the file (most important thing)
  • User ID
  • Password

To get the Server URL ( Path to file on SharePoint), you can go to SharePoint and then go to File and Right Click, Choose Properties and then you will see the Address (URL). That is the Server URL you need to use.

Accessing a File in Sharepoint 2016:

URL Location

Step 1: Find the Proper URL

In Share Point 2015, the most important step is to construct correct link required for accessing resource successfully.

For example, here the general URL of resource file is:

https://microsoft.sharepoint.com/teams/Hadron/Shared%20Documents/Forms/AllItems.aspx?O/Support=undefined&FolderCTID=0x01200080C5E30310F0FB4CAB8F93BDB912C0E3&id=%2Fteams%2FHadron%2FShared%20Documents%2F_M%26O%2FSupport%2FServices%20Forecasting%2FMaster%20User%20List

But the URL which will be used to access the resource file will be:

https://microsoft.sharepoint.com//teams/Hadron/Shared%20Documents/_M&O/Support/Services%20Forecasting/Master%20User%20List/Services%20master%20list.xlsx

Step 2: Download the File via PowerShell or SSIS

 

 

Method #1: Powershell

File Access via Powershell

Copy and Paste the code below into Powershell (Remember to replace your File URL on the "$FileUrl" line):
[crayon-5d84f70637066438591798/]

 

 

Method #2: SSIS

Accessing a File via SSIS

SSIS Access Code

 

Copy and paste the code below into SSIS (Remember to create a variable in SSIS with your specific URL that will be pulled in by the bolded section below):
[crayon-5d84f70637086517792472/]
With that, you should be able to access any Sharepoint file! Enjoy!

Any thoughts?



Loading more content...