Skip to content

Commit b6830ed

Browse files
Merge pull request #312834 from VincentLiu777/main
Update date and PowerShell commands in redundancy article
2 parents 5994ff2 + e475eb2 commit b6830ed

1 file changed

Lines changed: 23 additions & 9 deletions

File tree

articles/storage/files/files-redundancy.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Understand the data redundancy options available for Azure file sha
44
author: khdownie
55
ms.service: azure-file-storage
66
ms.topic: concept-article
7-
ms.date: 09/10/2025
7+
ms.date: 03/09/2026
88
ms.author: kendownie
99
ms.custom: references_regions
1010
# Customer intent: "As a data engineer, I want to select the appropriate data redundancy option for Azure file shares, so that I can ensure optimal availability and disaster recovery tailored to my organization's needs."
@@ -211,19 +211,33 @@ To view region supportability based on different billing models, use Azure Power
211211
# [PowerShell](#tab/azure-powershell)
212212

213213
```powershell
214-
# Login to Azure account
214+
Powershell:
215+
216+
# Login
215217
Connect-AzAccount
218+
# (Optional but recommended if you have multiple subs)
219+
# Set-AzContext -Subscription $subscriptionID
216220
217-
# Track down the subscription ID in GUID format
218221
$subscriptionID = "your-subscription-id-number"
219222
220-
# Get Token
221-
$token = Get-AzAccessToken
223+
# Get token (now SecureString by default)
224+
$secureToken = (Get-AzAccessToken).Token # SecureString now [1](/powershell/module/az.accounts/get-azaccesstoken?view=azps-15.3.0)
222225
223-
# Invoke SRP list SKU API, and get the returned SKU list
224-
$result = Invoke-RestMethod -Method Get -Uri "https://management.azure.com/subscriptions/$($subscriptionID)/providers/Microsoft.Storage/skus?api-version=2024-01-01" -Headers @{"Authorization" = "Bearer $($token.Token)"}
226+
# Convert SecureString -> plaintext (Az 14 migration pattern)
227+
$ssPtr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($secureToken)
228+
try {
229+
$plainToken = [System.Runtime.InteropServices.Marshal]::PtrToStringBSTR($ssPtr)
230+
}
231+
finally {
232+
[System.Runtime.InteropServices.Marshal]::ZeroFreeBSTR($ssPtr)
233+
}
234+
235+
# Call List SKUs
236+
$uri = "https://management.azure.com/subscriptions/$subscriptionID/providers/Microsoft.Storage/skus?api-version=2025-08-01"
237+
$headers = @{ Authorization = "Bearer $plainToken" }
238+
239+
$result = Invoke-RestMethod -Method Get -Uri $uri -Headers $headers
225240
226-
# Filter the SKU list to get the required information, customization required here to get the best result.
227241
$filteredResult = $result | `
228242
Select-Object -ExpandProperty value | `
229243
Where-Object {
@@ -296,7 +310,7 @@ subscriptionID="your-subscription-id-number"
296310
token=$(az account get-access-token --query accessToken --output tsv)
297311

298312
# Invoke SRP list SKU API, and get the returned SKU list
299-
result=$(az rest --method get --uri "https://management.azure.com/subscriptions/$subscriptionID/providers/Microsoft.Storage/skus?api-version=2024-01-01" --headers "Authorization=Bearer $token")
313+
result=$(az rest --method get --uri "https://management.azure.com/subscriptions/$subscriptionID/providers/Microsoft.Storage/skus?api-version=2025-08-01" --headers "Authorization=Bearer $token")
300314

301315
# Filter the SKU list to get the required information, customization required here to get the best result.
302316
filteredResult=$(echo $result | jq '.value[] | select(.resourceType == "storageAccounts" and (.kind == "FileStorage" or .kind == "StorageV2") and (.name | test("^(?!Standard_RAGRS|Standard_RAGZRS)")))' )

0 commit comments

Comments
 (0)