Export DeviceInvetory of all devices

Export to CSV

Written by Ines

Last published at: February 24th, 2022

Script Examples:


Script:

Import-Module ThinscaleManagement

Get-Credential | Connect-TSTMGMTServer -Uri "myserver" # your server URI here

$path = '' #export path here

$devices = Get-TSTMGMTDevices

      

$export = foreach ($d in $devices){


    Get-TSTMGMTDeviceInventory -Device $d | Select @{n='DeviceName';e={$d.DeviceName}}, @{n='ProductType';e={$d.ProductType}},  *


}


$Export | Export-Csv $path\DeviceInventory.csv -NoTypeInformation