Here’s the scenario: You are working with Azure Automation and out of the blue, you start getting the error Invalid JSON primitive: Import-Module as depicted in the image below. Before changing your code (and I mean tearing up the code itself, modules, etc.) do yourself a favor and check the JSON file. Most of the time it is just bad formatting on the JSON file — missing a bracket, comma, or something like that.
Yes, sometimes it’s the simplest thing that trips you up.
More Quick Tips articles
- Using location in a consistent way in your ARM template parameters
- Using environment as variables in your Azure DevOps pipelines
- Removing Log Analytics with the soft-delete option
- Using conditions in ARM templates when deploying infrastructure-as-code
- Monitor your Azure VM from your mobile device by scanning a QR code