Custom DeviceInventory list

Written by Ines

Last published at: February 28th, 2022

Script Examples

Script

import-module ThinScaleManagement

$Filepath = 'c:\temp'    # <- where to store the CSV file

$Folder = "\Devices\folder" # <- Which folder to target

$server = 'URI'          # <- Change to your thinscale management server

Get-Credential | Connect-TSTMGMTServer -Uri $server 

# You can specify a folder to target to get inventory data from by adding a foldername (e.g. Get-TSTMGMTDevices -FolderName "\Devices\_Bas")

Get-TSTMGMTDevices -FolderName $Folder | Select  @{n='Manufacturer';e={(Get-TSTMGMTDevicesInventory -Device $_).Manufacturer}},

                            @{n='Model';e={(Get-TSTMGMTDevicesInventory -Device $_).Model}},

                            @{n='SystemType';e={(Get-TSTMGMTDevicesInventory -Device $_ ).SystemType}}, 

                            @{n='SerialNumber';e={(Get-TSTMGMTDevicesInventory -Device $_ ).SerialNumber}}, 

                            @{n='ProcessorCount';e={(Get-TSTMGMTDevicesInventory -Device $_).ProcessorCount}},

                            @{n='TotalPhysicalMemory';e={(Get-TSTMGMTDevicesInventory -Device $_).TotalPhysicalMemory}},

                            @{n='MACAddress';e={(Get-TSTMGMTDevicesInventory -Device $_).MACAddress}},

                            @{n='OperatingSystemVersion';e={(Get-TSTMGMTDevicesInventory -Device $_).OperatingSystemVersion}},

                            @{n='OperatingSystemName';e={(Get-TSTMGMTDevicesInventory -Device $_).OperatingSystemName}},

                            @{n='DomainMember';e={(Get-TSTMGMTDevicesInventory -Device $_).DomainMember}},

                            @{n='WindowsDirectory';e={(Get-TSTMGMTDevicesInventory -Device $_).WindowsDirectory}},

                            @{n='DotNetVersion';e={(Get-TSTMGMTDevicesInventory -Device $_).DotNetVersion}},

                            @{n='IEVersion';e={(Get-TSTMGMTDevicesInventory -Device $_).IEVersion}},

                            @{n='ReceiverVersion';e={(Get-TSTMGMTDevicesInventory -Device $_).ReceiverVersion}},

                            @{n='RDPVersion';e={(Get-TSTMGMTDevicesInventory -Device $_).RDPVersion}},

                            @{n='HorizonVersion';e={(Get-TSTMGMTDevicesInventory -Device $_).HorizonVersion}},

                            @{n='SCAntiVirus';e={(Get-TSTMGMTDevicesInventory -Device $_).SCAntiVirus}},

                            @{n='SCAntiSpyware';e={(Get-TSTMGMTDevicesInventory -Device $_).SCAntiSpyware}},

                            @{n='SCFirewall';e={(Get-TSTMGMTDevicesInventory -Device $_).SCFirewall}},

                            @{n='SCWindowsUpdates';e={(Get-TSTMGMTDevicesInventory -Device $_).SCWindowsUpdates}},

                            @{n='CPUName';e={(Get-TSTMGMTDevicesInventory -Device $_).CPUName}}, 

                            @{n='CPUMaxClockSpeed';e={(Get-TSTMGMTDevicesInventory -Device $_).CPUMaxClockSpeed}},

                            @{n='CPUProcessorId';e={(Get-TSTMGMTDevicesInventory -Device $_).CPUProcessorId}},

                            @{n='IsOS64Bit';e={(Get-TSTMGMTDevicesInventory -Device $_).IsOS64Bit}},

                            @{n='MonitorCount';e={(Get-TSTMGMTDevicesInventory -Device $_).MonitorCount}},

                            @{n='IsVM';e={(Get-TSTMGMTDevicesInventory -Device $_).IsVM}},

                            @{n='DiskModel'; e={(Get-TSTMGMTDevicesInventory -Device $_).DriveInfo[0].DiskModel}},

                            @{n='TotalMB'; e={(Get-TSTMGMTDevicesInventory -Device $_).DriveInfo[0].TotalMB}},

                            @{n='FreeMB'; e={(Get-TSTMGMTDevicesInventory -Device $_).DriveInfo[0].FreeMB}},

                            @{n='HasActiveWiFiAdapter'; e={(Get-TSTMGMTAPResults -Device $_ -MaxResults 1).Inventory[0].HasActiveWiFiAdapter}},

                            @{n='HasConnectedWiFiAdapter'; e={(Get-TSTMGMTAPResults -Device $_ -MaxResults 1).Inventory[0].HasConnectedWiFiAdapter}},

                            ObjectId, FolderId, @{n='FolderName';e={(Get-TSTMGMTFolder -FolderId $_.FolderId).FolderName}}, 

                            DeviceName, ProductVersion, LastBootTime, LastHeardFrom, LastUsed, LastUser, ActiveProfileRevision  | export-csv $Filepath\Devices_$(get-date -Format dd-MM-yyyy--HH-mm).csv -NoTypeInformation