Public/Get-SpecDeviceInfoFromRegistry.ps1

Function Get-SpecDeviceInfoFromRegistry {

    $regPath = "HKLM:\SOFTWARE\WOW6432Node\Specsavers\Info"

    $deviceType = try { (Get-ItemProperty -Path $regPath -Name 'DeviceType' -ea stop).DeviceType } catch { "" }
    $storeName = try { (Get-ItemProperty -Path $regPath -Name 'StoreName' -ea stop).StoreName } catch { "" }
    $epos = try { (Get-ItemProperty -Path $regPath -Name 'StoreNumber' -ea stop).StoreNumber } catch { "" }

    [PSCustomObject]@{
        DeviceType = $deviceType
        StoreName  = $storeName
        EPOS       = $epos
    }
}