Forum Discussion
Mayank Bansal
Microsoft
Oct 02, 2019Computer group created through PowerShell cmdlet not working
I created computer group using powershell cmdlet New-AzOperationalInsightsComputerGroup
-------
$Query = "Heartbeat | where Computer in ('myserver.adx.com') | distinct Computer" New-AzOperation...
- Oct 03, 2019
HiMayank Bansal You can use PowerShell to do ARM template deployment. The resource part in your case will look like this:
{ "name": "[concat(parameters('logAnalyticsWorkspaceName'), '/', 'id12345' )]", "type": "Microsoft.OperationalInsights/workspaces/savedSearches", "apiVersion": "2017-03-15-preview", "tags": { }, "properties": { "query": "Heartbeat | where Computer in ('myserver.adx.com') | distinct Computer", "displayName": "MyDN", "category": "MyCategory", "FunctionAlias" : "MyDN", "Version": 2, "ETag": "*", "Tags": [ { "Name": "Group", "Value": "Computer" } ] } }
The tags part with name Group and value Computer basically makes the function also Computer group.
Oct 03, 2019
HiMayank Bansal You can use PowerShell to do ARM template deployment. The resource part in your case will look like this:
{
"name": "[concat(parameters('logAnalyticsWorkspaceName'), '/', 'id12345' )]",
"type": "Microsoft.OperationalInsights/workspaces/savedSearches",
"apiVersion": "2017-03-15-preview",
"tags": {
},
"properties": {
"query": "Heartbeat | where Computer in ('myserver.adx.com') | distinct Computer",
"displayName": "MyDN",
"category": "MyCategory",
"FunctionAlias" : "MyDN",
"Version": 2,
"ETag": "*",
"Tags": [
{
"Name": "Group",
"Value": "Computer"
}
]
}
}
The tags part with name Group and value Computer basically makes the function also Computer group.
Mayank Bansal
Microsoft
Oct 11, 2019Thanks this helped.