Last active
December 6, 2019 18:23
-
-
Save jstrong013/b79bb36a29350b67df480b269231d3ca to your computer and use it in GitHub Desktop.
Example Code for Sync-SfItem - Citrix Community Answer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Answers question Generated here: https://community.sharefilesupport.com/citrixsharefile/topics/sync-sfitem-command-not-working | |
Add-PSSnapin ShareFile | |
$sfClient = Get-SfClient -Name "$env:Temp\sfclient.sfps" | |
New-PSDrive -Name sfDrive -PSProvider ShareFile -Client $sfClient -Root "\" | |
# Name Used (GB) Free (GB) Provider Root | |
# ---- --------- --------- -------- ---- | |
# sfDrive ShareFile \ | |
Sync-SfItem -LocalPath "C:\PowerShell\ShareFile\TEST\*.txt" -Upload -ShareFilePath "sfDrive:\Folder Example" -OverWrite | |
# Sync operation successfully completed. | |
Remove-PSDrive -Name sfDrive | |
Remove-Item -Path "$env:Temp\sfclient.sfps" -Force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This worked Great. Thanks for providing this