Private/Helper/Test-IsLaptop.ps1
<#
Copyright © 2024 Integris. For internal company use only. All rights reserved. #> FUNCTION Test-IsLaptop { <# .SYNOPSIS Determines if the system is a laptop. .DESCRIPTION This function checks the chassis type of the system to determine if it is a laptop. .PARAMETER None .EXAMPLE Test-IsLaptop .NOTES The function uses the Get-CIMInstance cmdlet to get the chassis type from the Win32_SystemEnclosure class. #> IF ((Get-CIMInstance Win32_SystemEnclosure).ChassisTypes -eq 8 -or (Get-CIMInstance Win32_SystemEnclosure).ChassisTypes -eq 9 -or (Get-CIMInstance Win32_SystemEnclosure).ChassisTypes -eq 10 -or (Get-CIMInstance Win32_SystemEnclosure).ChassisTypes -eq 14 -or (Get-CIMInstance Win32_SystemEnclosure).ChassisTypes -eq 30) { RETURN $True } RETURN $False } |