Databricks.API.PowerShell icon indicating copy to clipboard operation
Databricks.API.PowerShell copied to clipboard

Export-DatabricksEnvironment fails calling WriteAllBytes

Open MohnJadden opened this issue 1 year ago • 2 comments

I’m running the latest version of DatabricksPS, I have admin on my Databricks workspace, and Owner on my Azure subscription. I can run set-databricksenvironment with my access token and API root URL for East US, and the script appears to be able to view the users and folders, but when I run Export-databricksenvironment -localpath “c:\dbricksexport” -cleanlocalpath it throws the same error continuously as it runs:

Exception calling “WriteAllBytes” with “2” argument(s): “The given path’s format is not supported.” At C:\Users\myusername\OneDrive – mycompanyname\Documents\WindowsPowerShell\Modules\DatabricksPS\1.12.0.1\Public\WorkspaceAPI.ps1:91 char:3

  • [IO.File]::WriteAllBytes($LocalPath, $exportBytes)
  • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
  • FullyQualifiedErrorId : NotSupportedException

I tried a few other folders in case $LocalPath wanted a folder outside of the root of C: but no luck.

MohnJadden avatar Mar 28 '24 14:03 MohnJadden

looks like an issue with PowerShell vs. PowerShell Core which one are you using?

gbrueckl avatar Apr 12 '24 13:04 gbrueckl

Regular Powershell, non-Core. 5.1.

MohnJadden avatar Apr 15 '24 12:04 MohnJadden