Close/get storage file handles via azure-cli (as Close-AzStorageFileHandle in PowerShell)
Is your feature request related to a problem? Please describe.
I receive the following error while trying to delete file
HTTP status code=409, Exception=The specified resource is marked for deletion by an SMB client. ErrorCode: DeletePending
The suggested solution is to close file handle lock via PowerShell: https://docs.microsoft.com/en-us/azure/storage/files/storage-troubleshoot-cannot-delete-files-azure-file-share#resolution
Describe the solution you'd like
It should be possible to perform Close-AzStorageFileHandle and Get-AzStorageFileHandle via azure-cli (not only PowerShell).
Describe alternatives you've considered
I've considered using portal.azure.com trying to delete file, but there is no such possibility as well to delete file or close/get file handles.
Additional context
storage
Any updates on it?
we need this in az-cli too. Thanks.
need this too.
The list and close handle command have been supported in previous versions of CLI, feel free to give it a try.
az storage share list-handle https://learn.microsoft.com/en-us/cli/azure/storage/share?view=azure-cli-latest#az-storage-share-list-handle
az storage share close-handle https://learn.microsoft.com/en-us/cli/azure/storage/share?view=azure-cli-latest#az-storage-share-close-handle