Reply To: PowerShell | Identify device as laptop.

  • Topaz George

    5 July 2020 at 7:42 pm

    Hope this helps.

    %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\PowerShell.exe -NonInteractive -WindowStyle Hidden -noprofile -ExecutionPolicy Bypass -command "&{$tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment;if ((get-wmiobject -class Win32_SystemEnclosure).chassistypes -in ("""8""","""9""","""10""","""11""","""14""")) {$tsenv.Value('isLaptop') = 'True'} else {$tsenv.Value('isLaptop') = 'False'}}"

DCOM hardening issue.

This application fails to authenticate with WMI on the SCCM server because Microsoft has not yet hardened DCOM on their Windows Preinstallation Environment. We are working on a different approach, but it will only be released during the first quarter of 2024. But until that time, the only workaround will be to uninstall the update corresponding to KB5004442.