Hello, thank you. that worked perfectly. here is the code that worked for me for reference
# Set up headers correctly for Meraki API authentication
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$headers.Add("Accept", "application/json")
$headers.Add("X-Cisco-Meraki-API-Key", "YOURAPIKEY") # Replace with actual API key
# Define the API URL with proper query parameters
$networkId = "L_XXXX"
$organizationId = "XXXXXX"
$apiUrl = "https://api.meraki.com/api/v1/organizations/$organizationId/appliance/trafficShaping/vpnExclusions/b..."
# Make the GET request
try {
$response = Invoke-RestMethod -Uri $apiUrl -Method 'GET' -Headers $headers
$response | ConvertTo-Json -Depth 3 # Convert response to JSON format for readability
} catch {
Write-Host "Error occurred: $_"
}