Microsoft has developed a Universal Inventory standard to help partners deliver standardised SAM services ensuring data quality, privacy and security. Microsoft has partnered with SAM tool providers to facilitate seamless and safe syncing of data from clients’ existing SAM tools to a client’s local Microsoft Universal Inventory database.

Sam360’s syncronisation tool is a PowerShell script that queries inventory data from a client’s Sam360 cloud tenant (using the Sam360 Web API) and copies it to a client’s local Universal Inventory database. The following data items are copied as part of the process.

Type Details
Hardware Devices & ActiveSync Devices. CPU, Memory, Network Adapters, Physical & Logical Drives
Software All Software Titles, Services, Browsers
Users General Details, Logon Activity
Exchange Server Servers & Mailboxes
Database Server Servers & Databases
Virtualisation VMs, Hosts, Farms, Migration Events
Configuration Groups & Members
Office 365 Organisations, Subscriptions, Domains, Service Plans, Users, Assigned Plans

 

Step 1 – Download Sam360 Universal Inventory Integration Script

The Sam360 Universal Inventory integration PowerShell script is part of Sam360’s open source SAM Gold Toolkit. The latest version can be viewed on Github here and downloaded from here. Make sure to save the script with the correct file name extension ‘.ps1’ – Github can suggest a ‘.txt’ extension by default.

Step 2 – Run the script in PowerShell

Open a PowerShell window and execute the script. It may be necessary to temporarily change the script execution policy to allow a downloaded script to run. The script will prompt the user for details of the Universal Inventory database and Sam360 log on details.

Windows PowerShell

Copyright (C) Microsoft Corporation. All rights reserved.

 

PS C:\Users\sarah.morton> cd downloads

PS C:\Users\sarah.morton\downloads> .\Sam360UISync.ps1

 

   _____         __  __    _____       _     _   _______          _ _    _ _  

  / ____|  /\   |  \/  |  / ____|     | |   | | |__   __|        | | |  (_) | 

 | (___   /  \  | \  / | | |  __  ___ | | __| |    | | ___   ___ | | | ___| |_

  \___ \ / /\ \ | |\/| | | | |_ |/ _ \| |/ _` |    | |/ _ \ / _ \| | |/ / | __|

  ____) / ____ \| |  | | | |__| | (_) | | (_| |    | | (_) | (_) | |   <| | |_

 |_____/_/    \_\_|  |_|  \_____|\___/|_|\__,_|    |_|\___/ \___/|_|_|\_\_|\__|

 

 Sam360UISync.ps1

 

Computer Name:        D1010042

User Name:            sarah.morton@SAM360.LOCAL

Windows Version:      Microsoft Windows 10 Enterprise(10.0.17134)

PowerShell Host:      5

PowerShell Version:   5.1.17134.112

PowerShell Word size: 64 bit

CLR Version:          4.0.30319.42000

Elevated:             False

Current Date Time:    2018-07-06 12:25:22

Script Path:          C:\Users\Sarah.Morton\Downloads\Sam360UISync.ps1

API User Name:       

API Server:           https://api.sam360.com

 

Universal Inventory Database Details Required

Server Name (Default [localhost\SQLEXPRESS]):

Database Name (Default [UI_DB1]): UI_SYNCTEST_10

 

Sam360 Credentials Required

Username: sarah.morton@sam360.com

Password: *******************

 

12:58:01.95 – Authenticating to https://api.sam360.com

12:58:02.11 – Retrieving organisation details

If your Sam360 user account has access to more than 1 client’s data, you will be prompted to choose which client’s data to download.

12:58:02.11 – Retrieving organisation details

 

Index OrganisationName                   OrganisationDeviceCount

—– —————-                   ———————–

    1 Contoso Ltd                        2306                  

    2 Fabrikam, Inc                      18430                     

    3 Northwind Traders                  482                     

 

3 organisations available. Select the required organisation

Index (Default [1]): 1

 

Organisation ‘Contoso Ltd’ selected

12:58:06.27 – Querying Device details from Sam360

12:58:12.60 – Saving Device details to database [2306 Records]

12:58:23.49 – Querying User details from Sam360

12:58:24.73 – Saving User details to database [1495 Records]

12:58:28.02 – Querying Software Installation details from Sam360

12:58:28.28 – Saving Software Installation details to database [333 Records]

12:58:28.61 – Querying CPU details from Sam360

12:58:29.49 – Saving CPU details to database [328 Records]

12:58:29.80 – Querying Database Server details from Sam360

12:58:30.23 – Saving Database Server details to database [106 Records]

12:58:30.52 – Querying VM details from Sam360

12:58:30.66 – Saving VM details to database [129 Records]

12:58:30.83 – Querying VM Host details from Sam360

12:58:31.08 – Saving VM Host details to database [8 Records]

12:58:31.11 – Querying Mail Server details from Sam360

12:58:31.18 – Saving Mail Server details to database [0 Records]

12:58:31.19 – Querying Active Sync Device details from Sam360

12:58:31.24 – Saving Active Sync Device details to database [0 Records]

12:58:31.26 – Querying Service details from Sam360

12:58:36.15 – Saving Service details to database [15092 Records]

12:58:51.39 – Querying Web Browser details from Sam360

12:58:51.53 – Saving Web Browser details to database [137 Records]

12:58:51.60 – Querying Group details from Sam360

12:58:51.73 – Saving Group details to database [0 Records]

12:58:51.76 – Querying VM Events details from Sam360

12:58:51.80 – Saving VM Events details to database [0 Records]

12:58:51.81 – Querying Device Logons details from Sam360

12:58:54.10 – Saving Device Logons details to database [117 Records]

Downloading and saving the data can take a few minutes depending on how large the client organisation is. It’s also possible to specify UI database and Sam360 logon details as command line parameters to the script.

Windows PowerShell

Copyright (C) Microsoft Corporation. All rights reserved.

 

PS C:\Users\sarah.morton> cd downloads

PS C:\Users\sarah.morton\downloads> .\Sam360UISync.ps1 -UIDatabaseServerName “localhost\SQLEXPRESS” -UIDatabaseName “UI_SYNCTEST_10” -UserName “sarah.morton@sam360.com”

 

The data has now been imported in to the selected Universal Inventory database. It can be viewed inside the Universal Inventory application.