Troubleshooting Get-AzVirtualNetwork

Are you encountering the following error message when working with Azure in PowerShell and running the command Get-AzVirtualNetwork? 'Microsoft.Azure.Management.Network.Models.SecurityRule', on 'T MaxInteger[T](System.Collections.Generic.IEnumerable`1[T])' violates the constraint of type 'T'. This error can be caused by an incompatibility between PowerShell 7 and the Az Module and incompatibilty with .NET 7. To fix this issue, try the following steps: Upgrade to the latest versions of PowerShell 7 and the Az module. If the issue persists, remove all versions of the Az Module on your system by using the command Uninstall-Module Az -AllVersions. ...

Mon, 16 January 2023 · 1 min · Mark

Adf Failed To Deactivate Trigger

A colleague had an issue this week with Azure Data Factory (ADF) in that a change to a trigger could not be published. “Ah, I know what this is”, I thought. Those of you familiar with ADF will know that changes to published triggers cannot be made if the trigger is enabled. Troubleshooting Steps I began troubleshooting by first of all disabling the trigger. This also resulted in failure. I then proceeded to detach the trigger from the pipeline, copy out the JSON definition and then save and publish, but also got the same error. ...

Mon, 9 January 2023 · 2 min · Mark

Protect Your Kids Online

As the “IT guy” I sometimes get asked how to protect kids online from malware and adult content. This article will show you how to easily implement a solution. I recently bought a new router so I could segment my home network and get prepared for FTTP internet, and I thought I’d share with you how I set it up to protect my family home. Maybe it will help you. ...

Fri, 28 October 2022 · 4 min · Mark

How to Setup IPv6 with Pfsense

In my previous post I talked about what I learnt about IPv6. In this post I want to show you how easy it is to set up IPv6 using pfSense as the router, and Zen Internet (UK) as the ISP. Request IPv6 from Zen Email Zen and ask for IPv6, and it should be ready the same day, excluding weekends. You will receive an email from them with information like this: ...

Sun, 23 October 2022 · 4 min · Mark

I Set up IPv6 at Home

IPv4 As you may already know IANA, the global Internet Assigned Numbers Authority, have exhausted the IPv4 address space. Today, we are forced to use Network Address Translation (NAT) for home and mobile environments to translate the public IP address given to us by our ISP to internal private non-routable v4 addresses on our home devices. This works but is messy and problems will only increase as the number of devices in the world grows. We have already run out of IPv4 address space and some ISPs are implementing horrible solutions to get round it by using things like carrier grade NAT (CGN). ...

Sat, 1 October 2022 · 7 min · Mark

Sql Virtual Machine Race Conclusion

A couple of months ago I wrote about a race condition in a SQL IaaS VM using the Azure sqlvm resource. I have been working with Microsoft and have come to a better resolution than placing tempdb on a separate remote drive as mentioned in that article. Suggestion Microsoft suggested to change the startup type of the SQL Server service to Automatic (Delayed Start). I have now put this into the bicep template for both SQL Server and SQL Server Agent service. ...

Thu, 30 June 2022 · 3 min · Mark

Clear Msdb Backup History Safely

I came across a situation this week where the msdb database had grown to a large amount (130 GB). This is the largest I’ve ever seen msdb and is a result of no scheduled maintenance of the backup history for several years. msdb.dbo.sp_delete_backuphistory Why not just run msdb.dbo.sp_delete_backuphistory I hear you say? Well, when the history tables have over 100 million rows each and the database files are on the C drive, running this proc will require huge amounts of transaction log space. Each delete statement will be cleaning out millions of rows per table in a single transaction. ...

Fri, 10 June 2022 · 4 min · Mark

Sql Virtual Machine Race Condition

I’ve been having problems deploying a Sql Virtual Machine in Azure lately and decided to perform some tests to get to the bottom of the issue. I’d like to share some strange behaviour. Problem If I deploy a new SQL VM using bicep, it deploys fine. If however, I redeploy the same VM the deployment fails with this error: Ext_AutomatedBackupError * code: **Ext_AutomatedBackupError** * Error: **Execution Timeout Expired**. The timeout period elapsed prior to completion of the operation or the server is not responding.;System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out. In the SQL Server ERRORLOG on the VM: ...

Tue, 12 April 2022 · 5 min · Mark

Where to store Azure Pipelines Variables?

Question Where should variables be stored for deploying infrastructure-as-code in Azure DevOps pipelines to Azure? Resources need to be deployed to different regions and environments, and attributes for these need to be stored somewhere. Options Six options spring to mind. Parameter files. Seems like the obvious choice. Template file defaults in azuredeploy.json or main.bicep Azure DevOps Library variable groups. Seems good, a single place Azure Pipelines variables in individual pipelines Configuration file within the project source code Runtime parameters for setting values at run time Let’s go through each option and then discuss my preferred approach. ...

Fri, 4 March 2022 · 7 min · Mark

Automate Setting the SqlIaaS Backup Container

Even though Microsoft offer Azure Sql Database and Azure Sql Managed Instance, there are occasions when SQL Server in a VM is required. The SqlIaaS Azure Resource If you’ve read my posts before you will know that I deploy resources to the cloud using infrastructure-as-code, with my preferred language being bicep. As a lazy developer, I like to use built-in offerings and PaaS wherever possible. For SQL server on VMs in Azure, the resource Microsoft.SqlVirtualMachine/sqlVirtualMachines is great. ...

Fri, 25 February 2022 · 2 min · Mark