#Get-SPOFile Downloads a file. ##Syntax
Get-SPOFile [-Path <String>] [-Filename <String>] [-AsString [<SwitchParameter>]] [-Web <WebPipeBind>] -ServerRelativeUrl <String>Get-SPOFile [-Path <String>] [-Filename <String>] [-AsString [<SwitchParameter>]] [-Web <WebPipeBind>] -SiteRelativeUrl <String>##Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| AsString | SwitchParameter | False | |
| Filename | String | False | |
| Path | String | False | |
| ServerRelativeUrl | String | True | |
| SiteRelativeUrl | String | True | |
| Web | WebPipeBind | False | The web to apply the command to. Omit this parameter to use the current web. |
| ##Examples |
###Example 1
PS:> Get-SPOFile -ServerRelativeUrl /sites/project/_catalogs/themes/15/company.spcolorDownloads the file and saves it to the current folder
###Example 2
PS:> Get-SPOFile -ServerRelativeUrl /sites/project/_catalogs/themes/15/company.spcolor -Path c:\temp -FileName company.spcolorDownloads the file and saves it to c:\temp\company.spcolor
###Example 3
PS:> Get-SPOFile -ServerRelativeUrl /sites/project/_catalogs/themes/15/company.spcolor -AsStringDownloads the file and outputs its contents to the console
###Example 4
PS:> Get-SPOFile -SiteRelativeUrl _catalogs/themes/15/company.spcolor -Path c:\temp -FileName company.spcolorRefers to the file by site relative URL, downloads the file and saves it to c:\temp\company.spcolor