Windows 10 Upgrade Analytics – Notes and PowerShell snippets

I am considering using the Windows 10 upgrade analytics for our Windows 10 project that we’ve just started just recently. Below you find some random notes and references I have gathered during my exploration journey.

The Upgrade Analytics Blog

Here is where you find the latest information from the Upgrade Analytics team:

Upgrade Analytics on TechNet

Information about the Architecture, deployment techniques, prerequisites and more can be found here:

If you have concerns about data privacy, this document describes in detail what data is being collected and send to Microsoft Windows 7, Windows 8, and Windows 8.1 appraiser telemetry events and fields

The Ignite 2016 presentations

Too lazy to read all the documentation? (at some point you will have to anyway) here are the presentations from the Microsoft Ignite Conference 2016 (Level 100) (Level 200)

Getting Started

Easy to follow step by step instructions can be found here:

The Upgrade Analytics Deployment Script

A description of the script and its error codes is documented here:

Be patient!

So once you have setup the OMS Workspace and you ran the deployment scrip on the client, patience is required, because at present, it can take up to 48 hours until you actually see the data within the console. Within one of the videos they explain why in more detail.

PowerShell !!

As always, the big question, can we PowerShell this thing? Yes!!! I got the initial hints from this article:

You will need the Azure OperationalInsights module for this, here’s how to install it:

Find-Module AzureRM.OperationalInsights | Install-Module

and check if it installed correctly:

Get-Module AzureRm.OperationalInsights

Most of the Azure OperationalInsights cmdlets require the Resource Group and Workspace parameter, here’s how you get the information for your Worksapces

Find-AzureRmResource -ResourceType "Microsoft.OperationalInsights/workspaces"


So for my further code snippets I define the the following variables:

$ResourceGroupName = "mms-weu"
$WorkSpaceName = "AlexVerboonOMS"

Okay, now let’s take a look if we have any saved searches (we have because i created two of them)

# Get Saved Searches
$query = Get-AzureRmOperationalInsightsSavedSearch -ResourceGroupName $ResourceGroupName -WorkspaceName $WorkSpaceName
$query.value |FL



To see the definition of the saved search  we’ll use the following code, note the SavedSearchId value

$query = Get-AzureRmOperationalInsightsSavedSearch  -ResourceGroupName $ResourceGroupName -WorkspaceName $WorkSpaceName -SavedSearchId "test|Drivers"
$ | FL



Now let’s get the data.

$result = Get-AzureRmOperationalInsightsSavedSearchResults -ResourceGroupName $ResourceGroupName -WorkspaceName $WorkSpaceName -SavedSearchId "test|Drivers"
$Drivers = $result.value | ConvertFrom-Json



Run a query directly without using a saved search? Here you go:

$dynamicQuery = "Manufacturer=*"
$result = Get-AzureRmOperationalInsightsSearchResults -ResourceGroupName $ResourceGroupName -WorkspaceName $WorkSpaceName -Query $dynamicQuery -Top 10$result.Value | ConvertFrom-Json

And last but not least, let’s have a look at all the classes that are in OMS, by exploring the Schema.

$schema = Get-AzureRmOperationalInsightsSchema -ResourceGroupName $ResourceGroupName -WorkspaceName $WorkSpaceName
$schemas = $schema.Value | Select-Object Name| Sort-Object Name

and here a quick and dirty script that outputs all the classes that actually hold data.

$datainfo = @()
ForEach($s in $schemas)
    $dynamicQuery = "$($*"
    $result = Get-AzureRmOperationalInsightsSearchResults -ResourceGroupName $ResourceGroupName -WorkspaceName $WorkSpaceName -Query $dynamicQuery -Top 10
    $hasdata = $result.Value | ConvertFrom-Json
    If ($hasdata -eq $null)
            write-host "class $($ has no log data" -ForegroundColor DarkGreen
            write-host "class $($ contains log data" -ForegroundColor Green
            $datainfo += "$($s.Name)"


That’s it for today, waiting for more data to come into my workspace Smile

Leave a Reply