Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
Microsoft Fabric OneLake kan integreres med Azure PowerShell-modulet til læsning, skrivning og administration af data.
Forbind til OneLake med Azure PowerShell
Forbind til OneLake fra PowerShell ved at følge disse trin:
Installér Azure Storage PowerShell-modulet.
Install-Module Az.Storage -Repository PSGallery -Force
Log på din Azure-konto.
Connect-AzAccount
Opret konteksten for lagerkontoen.
- Lagerkontonavnet er onelake.
- Angiv
-UseConnectedAccount
som passthrough af dine Azure-legitimationsoplysninger. - Angiv
-endpoint
somfabric.microsoft.com
.
Kør de samme kommandoer, der bruges til Azure Data Lake Storage (ADLS) Gen2. Du kan få flere oplysninger om ADLS Gen2 og Azure Storage PowerShell-modulet under Brug PowerShell til at administrere ADLS Gen2.
Eksempel: Hent størrelsen på et element eller en mappe
Install-Module Az.Storage -Repository PSGallery -Force
Connect-AzAccount
$ctx = New-AzStorageContext -StorageAccountName 'onelake' -UseConnectedAccount -endpoint 'fabric.microsoft.com'
# This example uses the workspace and item name. If the workspace name does not meet Azure Storage naming criteria (no special characters), you can use GUIDs instead.
$workspaceName = 'myworkspace'
$itemPath = 'mylakehouse.lakehouse/Files'
# Recursively get the length of all files within your lakehouse, sum, and convert to GB.
$colitems = Get-AzDataLakeGen2ChildItem -Context $ctx -FileSystem $workspaceName -Path $itemPath -Recurse -FetchProperty | Measure-Object -property Length -sum
"Total file size: " + ($colitems.sum / 1GB) + " GB"