Command
Get-File
Syntax
Get-File
-List <List> -Path <Uri>
Get-File
-Path <Uri>
Description
The command to get a file from a SharePoint list or from the File Share.
Examples
Get File Share file
Get-File -Path "G:\MyFile.txt" Title : MyFile.txt FileType : FileShare List : Address : file:///G:/MyFile.txt Web :
Get SharePoint file
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysitecollection" $srcList = Get-List -site $srcSite -name "MyList" Get-File -List $srcList -Path "MyFolder/MyFile.txt" Title : MyFile.txt FileType : SharePoint List : Sharegate.Automation.Entities.List Address : http://myfarm1/sites/mysitecollection/MyList/MyFolder/MyFile.txt Web : Sharegate.Infrastructure.Models.SharePoint.SGWeb
Parameters
-List <List>
Specifies the SharePoint List.
Required? | True |
Position? | 0 |
Default value | |
Accept pipeline input? | true (ByValue) |
Accept wildcard characters? | False |
Parameter set name | SharePoint |
Aliases | None |
-Path <Uri>
Specifies the relative path from the SharePoint list.
Required? | True |
Position? | 1 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
Inputs
URI
The path to the file to get.
Outputs
File
The file matching parameters.