$Subs = Get-AzSubscription # Set array $DiagResults = @() # Loop through all Azure Subscriptions foreach ($Sub in $Subs) { Set-AzContext $Sub.id | Out-Null Write-Host “Processing Subscription:” $($Sub).name # Get all Azure resources for current subscription $Resources = Get-AZResource -ExpandProperties -ResourceType microsoft.insights/components # Get all Azure resources which have Diagnostic settings enabled and configured foreach ($res in $Resources) { $resId = $res.ResourceId If ( $res.Type -match “microsoft.insights/components” ) { # Write-Host $res.Type }else { continue } #Write-Host $res.Properties.IngestionMode #Write-Host $resId $DiagSettings = Get-AzDiagnosticSetting -ResourceId $resId -WarningAction SilentlyContinue -ErrorAction SilentlyContinue | Where-Object { $_.Id -ne $null } #Write-Host $DiagSettings foreach ($diag in $DiagSettings) { #Write-Host $diagRead More →

As you know we can use the variable in some of the format such as : [[variable]]$variable${variable} When upgrading to v10.3.1 , i realize that the variable __interval_ms can’t be used as [[__interval_ms]] , we need to to use it as $__interval_ms as [[]] is going to be depreciated soon, it’s recommended to use the new format. If you have old dashboard and it’s not displaying correctly, check the variable.Read More →

I recently bought a used Canon 70-200mm F2.8 IS . The lens is in good condition, but it has an issue with auto focus. When you try to focus, you can see the focus ring spinning very fast, but it’s failed to focus , it seems only focus for object over 10mm  or it’s at infinity. After some research, it turn out that the issues was caused by a dirty focus sensor and focus bar.  Below are the 2 videos that will help you to fix that problem. I did it it’s half success – the focus is now working, but i damage a flexRead More →

This query can help you to identify the orphan smart detector alerts – there is also a command column which can help you to run it in shell.portal.com resources | where type in (“microsoft.alertsmanagement/smartdetectoralertrules”)| project subscriptionId, id,name,resourceGroup,properties.actionGroups.groupIds[0] , properties.scope[0] | project-rename alert_id = id, alert_subscription=subscriptionId,alert_name=name,target_id=properties_scope_0,actionGroupId=properties_actionGroups_groupIds_0 | extend target_id=tolower(tostring(target_id)) | join kind=leftouter ( resources | project id,name,type,resourceGroup,subscriptionId | extend id=tolower(tostring(id))) on $left.target_id==$right.id | where name==”” | extend target_name=split(target_id,”/”)[-1] |extend cmd_delete=strcat(“az resource delete –ids \””, alert_id,”\””)Read More →

If you are on free plan, you might realize that you can’t upload any files larger than 100MB. This is the limit that cloudflare applies to Free plan. If you are on Enterprise , you might increase this limit to 500MB. Want over 500MB, you might need to ask cloudflare to make an exception. Cloudflare is great, but 100MB is quite small for video upload. What solution could be? – Upgrade to enterprise (oh no, i can’t afford it) – Disable the proxy – you will not benefit from cloudflare any more – Create a new direct url upload that will not go through cloudflareRead More →