Create Pull Request
| Date | Scan | Status | Result |
|---|---|---|---|
| 2026-01-14 00:00 | #250 | in_progress |
Clean
|
| 2026-01-13 00:00 | #246 | completed |
Biased
|
| 2026-01-11 00:00 | #240 | completed |
Biased
|
| 2026-01-10 00:00 | #237 | completed |
Biased
|
| 2026-01-09 00:34 | #234 | completed |
Biased
|
| 2026-01-08 00:53 | #231 | completed |
Biased
|
| 2025-08-19 00:01 | #85 | completed |
Clean
|
| 2025-07-13 21:37 | #48 | completed |
Biased
|
| 2025-07-12 23:44 | #41 | cancelled |
Biased
|
Import-Module "C:\Program Files\Azure\StorageSyncAgent\StorageSync.Management.ServerCmdlets.dll" Set-StorageSyncProxyConfiguration -Address <url> -Port <port number> -ProxyCredential <credentials>
# IP address or name of the proxy server. $Address="http://127.0.0.1" # The port to use for the connection to the proxy. $Port=8080 # The user name for a proxy. $UserName="user_name" # Please type or paste a string with a password for the proxy. $SecurePassword = Read-Host -AsSecureString $Creds = New-Object System.Management.Automation.PSCredential ($UserName, $SecurePassword) # Please verify that you have entered the password correctly. Write-Host $Creds.GetNetworkCredential().Password Import-Module "C:\Program Files\Azure\StorageSyncAgent\StorageSync.Management.ServerCmdlets.dll" Set-StorageSyncProxyConfiguration -Address $Address -Port $Port -ProxyCredential $Creds
Import-Module "C:\Program Files\Azure\StorageSyncAgent\StorageSync.Management.ServerCmdlets.dll" Test-StorageSyncNetworkConnectivity
# The specific region to get the IP address ranges for. Replace westus2 with the desired region code
# from Get-AzLocation.
$region = "westus2"
# The service tag for Azure File Sync. Don't change unless you're adapting this
# script for another service.
$serviceTag = "StorageSyncService"
# Download date is the string matching the JSON document on the Download Center.
$possibleDownloadDates = 0..7 | `
ForEach-Object { [System.DateTime]::Now.AddDays($_ * -1).ToString("yyyyMMdd") }
# Verify the provided region
$validRegions = Get-AzLocation | `
Where-Object { $_.Providers -contains "Microsoft.StorageSync" } | `
Select-Object -ExpandProperty Location
if ($validRegions -notcontains $region) {
Write-Error `
-Message "The specified region $region isn't available. Either Azure File Sync isn't deployed there or the region doesn't exist." `
-ErrorAction Stop
}
# Get the Azure cloud. This should automatically based on the context of
# your Az PowerShell login, however if you manually need to populate, you can find
# the correct values using Get-AzEnvironment.
$azureCloud = Get-AzContext | `
Select-Object -ExpandProperty Environment | `
Select-Object -ExpandProperty Name
# Build the download URI
$downloadUris = @()
switch($azureCloud) {
"AzureCloud" {
$downloadUris = $possibleDownloadDates | ForEach-Object {
"https://download.microsoft.com/download/7/1/D/71D86715-5596-4529-9B13-DA13A5DE5B63/ServiceTags_Public_$_.json"
}
}
"AzureUSGovernment" {
$downloadUris = $possibleDownloadDates | ForEach-Object {
"https://download.microsoft.com/download/6/4/D/64DB03BF-895B-4173-A8B1-BA4AD5D4DF22/ServiceTags_AzureGovernment_$_.json"
}
}
"AzureChinaCloud" {
$downloadUris = $possibleDownloadDates | ForEach-Object {
"https://download.microsoft.com/download/9/D/0/9D03B7E2-4B80-4BF3-9B91-DA8C7D3EE9F9/ServiceTags_China_$_.json"
}
}
"AzureGermanCloud" {
$downloadUris = $possibleDownloadDates | ForEach-Object {
"https://download.microsoft.com/download/0/7/6/076274AB-4B0B-4246-A422-4BAF1E03F974/ServiceTags_AzureGermany_$_.json"
}
}
default {
Write-Error -Message "Unrecognized Azure Cloud: $_" -ErrorAction Stop
}
}
# Find most recent file
$found = $false
foreach($downloadUri in $downloadUris) {
try { $response = Invoke-WebRequest -Uri $downloadUri -UseBasicParsing } catch { }
if ($response.StatusCode -eq 200) {
$found = $true
break
}
}
if ($found) {
# Get the raw JSON
$content = [System.Text.Encoding]::UTF8.GetString($response.Content)
# Parse the JSON
$serviceTags = ConvertFrom-Json -InputObject $content -Depth 100
# Get the specific $ipAddressRanges
$ipAddressRanges = $serviceTags | `
Select-Object -ExpandProperty values | `
Where-Object { $_.id -eq "$serviceTag.$region" } | `
Select-Object -ExpandProperty properties | `
Select-Object -ExpandProperty addressPrefixes
} else {
# If the file cannot be found, that means there hasn't been an update in
# more than a week. Please verify the download URIs are still accurate
# by checking https://learn.microsoft.com/azure/virtual-network/service-tags-overview
Write-Verbose -Message "JSON service tag file not found."
return
}