Get-PC/Private/Get-CMDBDELInfo.ps1

24 lines
706 B
PowerShell
Raw Normal View History

2024-06-11 18:27:55 +00:00
function Get-CMDBDELInfo {
param (
$cmdb
)
Write-host "***NOTICE: $comp is a Device Exception computer. Please check CMDB/Asset Mgmt prior to supporting this workstation. ***" -BackgroundColor Black -ForegroundColor Yellow
if($null -eq $cmdb){
return
}
if($cmdb.values.ConfigurationItem._SHSVendorPC -eq 'True'){
$vendor = "Yes | Non-standard SHS Image/Hardware"
}
else{
$vendor = "No | Standard SHS Hardware"
}
$delInfo = [PSCustomObject]@{
Owner = $cmdb.values.ConfigurationItem._SHSAssetOwner
Vendor = $vendor
Description = $cmdb.values.ConfigurationItem._Description
}
return $delInfo
}