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
- New from Microsoft: Azure Security Center onboarding guide
- Fixing Azure Key Vault when moving to a different tenant
- Restore Azure Key Vault using just two PowerShell cmdlets
- This overlooked feature in Visual Studio Code can speed release time
- Enabling Front Door managed certificates in Azure: Status update