You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It worked until 11/24 and now we receive the following error code when this script runs:
PS C:\Users\Administrator> C:\ShareFile\PAS_Upload.ps1
Get-SfClient : Object reference not set to an instance of an object.
At C:\ShareFile\PAS_Upload.ps1:3 char:13
Sync-SfItem : Unable to cast object of type 'System.Management.Automation.PSDriveInfo' to type 'ShareFile.Api.Powershell.ShareFileDriveInfo'.
At C:\ShareFile\PAS_Upload.ps1:5 char:1
After over a week of troubleshooting, I was able to dial this down to the SFPS credential file. I'm not sure what caused this issue since the credential file is the same exact file that we have on dozens of other systems running this powershell script, the only difference is this is a server and it runs a task scheduler to automatically run the script every minute. My guess is either the server running the script somehow corrupted the credentials or sharefile is doing something to block that API account from uploading to their server.
In any case, I resolved the issue by running a new sfClient script and plugged in my own login (which uses 2FA, the API login is not supposed to have this). After it generated a new SFPS file, the script runs fine.
We have a script running automatically through task scheduler every couple of minutes to sync an in house folder to sharefile
It worked until 11/24 and now we receive the following error code when this script runs:
PS C:\Users\Administrator> C:\ShareFile\PAS_Upload.ps1
Get-SfClient : Object reference not set to an instance of an object.
At C:\ShareFile\PAS_Upload.ps1:3 char:13
New-PSDrive : Cannot bind argument to parameter 'Client' because it is null.
At C:\ShareFile\PAS_Upload.ps1:4 char:68
Sync-SfItem : Unable to cast object of type 'System.Management.Automation.PSDriveInfo' to type 'ShareFile.Api.Powershell.ShareFileDriveInfo'.
At C:\ShareFile\PAS_Upload.ps1:5 char:1
Remove-PSDrive : Cannot find drive. A drive with the name 'sfdrive' does not exist.
At C:\ShareFile\PAS_Upload.ps1:6 char:1
Has anyone else received this issue or can help me decipher whats happenign here?
The text was updated successfully, but these errors were encountered: