Skip to content

Instantly share code, notes, and snippets.

View arifams's full-sized avatar

arifams arifams

View GitHub Profile
@arifams
arifams / Get-ScreenServiceTags.ps1
Created January 25, 2024 08:11 — forked from spitfire05/Get-ScreenServiceTags.ps1
Get serial number of connected screens with Powershell
$Monitors = Get-WmiObject WmiMonitorID -Namespace root\wmi
ForEach ($Monitor in $Monitors)
{
    $Manufacturer = ($Monitor.ManufacturerName -notmatch 0 | ForEach{[char]$_}) -join ""
    $Name = ($Monitor.UserFriendlyName -notmatch 0 | ForEach{[char]$_}) -join ""
    $Serial = ($Monitor.SerialNumberID -notmatch 0 | ForEach{[char]$_}) -join ""
   
    "$Manufacturer,$Name,$Serial"
}