ShareFile-PowerShell
ShareFile-PowerShell copied to clipboard
There is an error in UploadLocalFiles.ps1
A variable rename was missed
Current code:
#upload directory is relative to the root of the account
#get the current user's home folder to use as the starting point
$ShareFileHomeFolder = (Send-SfRequest $sfClient -Entity Items).Url
#use the local My Documents folder as source
$LocalPath = (Join-Path $env:USERPROFILE "Documents")
#Create a PowerShell provider for ShareFile at the location specified
New-PSDrive -Name sfDrive -PSProvider ShareFile -Client $sfClient -Root "\" -RootUri $ShareFilePath
The line:
New-PSDrive -Name sfDrive -PSProvider ShareFile -Client $sfClient -Root "\" -RootUri $ShareFilePath
Should be changed for:
New-PSDrive -Name sfDrive -PSProvider ShareFile -Client $sfClient -Root "\" -RootUri $ShareFileHomeFolder