user13800089
user13800089

Reputation:

Query blob storage with Get-AzDataLakeGen2ChildItem?

Our powershell test harness used to use Get-AzDataLakeGen2ChildItem to list blobs found in non data lake storage accounts. Today I updated the powershell and Az module versions they were locked at, and now when issuing the command (specifying a Filesystem container, and context), the following error is returned:

Get-AzDataLakeGen2ChildItem: Input string was not in a correct format.

I'm assuming something has changed, and this function cannot process a result from non data lake storage compatibly anymore.

For one reason or another, a while back we changed from using Get-AzStorageBlob. So interested to know if there's any solution to be able to continue working with this call, rather than to deviate from Get-AzDataLakeGen2ChildItem where required.

Upvotes: 0

Views: 705

Answers (1)

AjayKumarGhose
AjayKumarGhose

Reputation: 4883

One of the workaround to list the sub directories and files in a directory or Filesystem from an Azure storage account using the Get-AzDataLakeGen2ChildItem .

Then you will get something like below example;

enter image description here

NOTE:- If you are using existing storage which has not enabled Hierarchical Namespace then you need to upgrade that storage account by doing the below steps:

enter image description here

For more information please refer the below links:-

Upvotes: 0

Related Questions