Reply To: PowerShell | Identify device as laptop.

  • Topaz George

    Organizer
    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'}}"