Hero Banner

Microsoft Partner Network

Where Microsoft's CSP, MSP, SI, and ISV partners seek new opportunities and learn from each other

Level 3 Contributor

customer usage attribution with CLI or PowerShell

The docs here mention the following lines of code for PowerShell and CLI:



export AZURE_HTTP_USER_AGENT='pid-eb7927c8-dd66-43e1-b0cf-c346a422063'


and I assume if you're running CLI from PowerShell (not a Bash window) then this might help:



Once I've set that how do I validate it worked? Let's say I run New-AzStorageAccount in PowerShell or "az storage account create" in CLI. I don't see that it creates any "deployments" so the Get-AzResourceGroupDeployment for that resource group returns nothing. Is there somewhere else it is marked? Or does this literally only work for actual ARM templates and not CLI or PowerShell creation of resources (without an ARM template)?




Hey Greg - my understanding is that it is specifically ARM templates and not CLI or PowerShell. I'll contact a few colleagues to confirm or correct this.


Correction: CLI and PowerShell are supported.


Probably need a support case for the error you're encountering.

Level 3 Contributor

An Azure support case or a Partner support case?

No error. I just don’t know how to validate it tagged us since there are no rows returned from Get-AzResourceGroupDeploy unless we use ARM templates.

Thanks so much for the follow up!