Skip to content

Commit 4721a10

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
add TODO note on validating properties
1 parent 1ec50fc commit 4721a10

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

wmi-adapter/wmi.resource.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ elseif ($Operation -eq 'Get')
9696
$wmi_namespace = $type_fields[0].Replace('.','\')
9797
$wmi_classname = $type_fields[1]
9898

99-
#TODO: identify key properties and add WHERE clause to the query
99+
# TODO: identify key properties and add WHERE clause to the query
100100
if ($r.properties)
101101
{
102102
$query = "SELECT $($r.properties.psobject.properties.name -join ',') FROM $wmi_classname"
@@ -105,6 +105,7 @@ elseif ($Operation -eq 'Get')
105105
$first = $true
106106
foreach ($property in $r.properties.psobject.properties)
107107
{
108+
# TODO: validate property against the CIM class to give better error message
108109
if ($null -ne $property.value)
109110
{
110111
$useWhere = $true

0 commit comments

Comments
 (0)