Export-GSDriveFile : Exception calling "Create"
Closed this issue ยท 7 comments
When I try to use the Export-GSDriveFile, I am getting the following error.
Export-GSDriveFile : Exception calling "Create" with "1" argument(s): "Access to the path 'c:\temp' is denied."
I can create files within this folder. I tried passing in a different folder with the -OutFilePath argument and I still get the same response. I also tried to manually run this line which is where it is failing:
$stream = [System.IO.File]::Create($OutFilePath)
This line doesn't appear to work when passing in a directory. It appears to want a full file path, but that isn't what is being passed in when using the Export-GSDriveFile function and it complains if I try to pass in a file:
Export-GSDriveFile : Cannot validate argument on parameter 'OutFilePath'. The "(Get-Item $_).PSIsContainer" validation script for the
argument with value "C:\temp\test\cheese.csv" did not return a result of True. Determine why the validation script failed, and then try
the command again.
This is on Windows 10 1803
Any ideas?
I just commented out this line
#[ValidateScript({(Get-Item $_).PSIsContainer})] in Export-GSDriveFile.ps1 and passed in a full file path and it worked fine.
Awesome! I just started using PSGSuite and OMG... It rocks! Great job on this!
@jtwaddle - Going to close this out! Let me know if you still have any issues after testing!
Works great! Thanks!