Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export-GSDriveFile : Exception calling "Create" #51

Closed
jtwaddle opened this issue Jun 7, 2018 · 7 comments
Closed

Export-GSDriveFile : Exception calling "Create" #51

jtwaddle opened this issue Jun 7, 2018 · 7 comments
Assignees
Labels

Comments

@jtwaddle
Copy link

jtwaddle commented Jun 7, 2018

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?

@jtwaddle
Copy link
Author

jtwaddle commented Jun 7, 2018

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.

@scrthq scrthq self-assigned this Jun 7, 2018
@scrthq scrthq added the bug label Jun 7, 2018
@scrthq
Copy link
Member

scrthq commented Jun 7, 2018

@jtwaddle - Makes sense! Thanks for bringing this up! I'm on it!

@jtwaddle
Copy link
Author

jtwaddle commented Jun 7, 2018

Awesome! I just started using PSGSuite and OMG... It rocks! Great job on this!

@scrthq
Copy link
Member

scrthq commented Jun 7, 2018

@jtwaddle thank you so much!! I'm happy you like it!

scrthq added a commit that referenced this issue Jun 9, 2018
scrthq added a commit that referenced this issue Jun 9, 2018
#### 2.6.3

* Fixed: `Export-GSDriveFile -OutFilePath C:\doc.pdf -Type PDF` failing due to incorrect parameter validation.  ([Issue #51](#51))
@scrthq
Copy link
Member

scrthq commented Jun 9, 2018

@jtwaddle - Fix has been deployed in v2.6.3! Please upgrade, test it out and let me know if you have any issues!

@scrthq
Copy link
Member

scrthq commented Jun 12, 2018

@jtwaddle - Going to close this out! Let me know if you still have any issues after testing!

@scrthq scrthq closed this as completed Jun 12, 2018
@ghost ghost removed the pending UAT label Jun 12, 2018
@jtwaddle
Copy link
Author

Works great! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants