Has anyone used the verb "SEARCH_ATTRS" from within a Powershell Query
to see what attributes are being passed.

As per the doco at 'Novell Doc: Identity Manager 3.6 Driver for
Scripting Implementation Guide - Microsoft PowerShell Developer Guide'
(http://www.novell.com/documentation/...a/bf24xms.html)

This is the XDS of the query is:

<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.5.10.20070918 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<query class-name="User" dest-dn="DC=corp,DC=net" scope="subtree">
<search-class class-name="User"/>
<search-attr attr-name="CN">
<value naming="true" timestamp="1241665645#20"
type="string">PETERL</value>
</search-attr>
<read-attr/>
</query>
</input>
</nds>


The Powershell I am using is:

function idm_query
{
$SCOPE = idm_geteventvalue "SCOPE"
idm_trace "QUERY: SCOPE = $SCOPE`r`n"
$ASSOCIATION = idm_geteventvalue "ASSOCIATION"
idm_trace "QUERY: ASSOCIATION = $ASSOCIATION`r`n"
$DEST_DN = idm_geteventvalue "DEST_DN"
idm_trace "QUERY: DEST_DN = $DEST_DN`r`n"
$CLASS_NAME = idm_geteventvalue "CLASS_NAME"
idm_trace "QUERY: CLASS_NAME = $CLASS_NAME`r`n"
$EVENT_ID = idm_geteventvalue "EVENT_ID"
idm_trace "QUERY: EVENT_ID = $EVENT_ID`r`n"
$SEARCH_CLASSES = idm_geteventvalue "SEARCH_CLASSES"
idm_trace "QUERY: SEARCH_CLASSES = $SEARCH_CLASSES`r`n"
$SEARCH_ATTRS = idm_geteventvalue "SEARCH_ATTRS"
idm_trace "QUERY: SEARCH_ATTRS = $SEARCH_ATTRS`r`n"
$SEARCH_ATTRSCNT = $SEARCH_ATTRS.Count
idm_trace "QUERY: SEARCH_ATTRSCNT = $SEARCH_ATTRSCNT`r`n"
$SEARCH_ATTRSZERO = $SEARCH_ATTRS[0]
idm_trace "QUERY: SEARCH_ATTRSZERO = $SEARCH_ATTRSZERO`r`n"
$SEARCH_ATTR_CN = idm_geteventvalue "SEARCH_ATTR_CN"
idm_trace "QUERY: SEARCH_ATTR_CN = $SEARCH_ATTR_CN`r`n"
$READ_ATTRS= idm_geteventvalue "READ_ATTRS"
idm_trace "QUERY: READ_ATTRS = $READ_ATTRS`r`n"
$ALL_READ_ATTRS= idm_geteventvalue "ALL_READ_ATTRS"
idm_trace "QUERY: ALL_READ_ATTRS = $ALL_READ_ATTRS`r`n"
$NO_READ_ATTRS= idm_geteventvalue "NO_READ_ATTRS"
idm_trace "QUERY: NO_READ_ATTRS = $NO_READ_ATTRS`r`n"
$READ_PARENT= idm_geteventvalue "READ_PARENT"
idm_trace "QUERY: READ_PARENT = $READ_PARENT`r`n"
}

And what I get back is:

25/05/2009 11:41:03 a.m. QUERY: SCOPE = subtree
25/05/2009 11:41:03 a.m. QUERY: ASSOCIATION =
25/05/2009 11:41:03 a.m. QUERY: DEST_DN = DC=corp,DC=net
25/05/2009 11:41:03 a.m. QUERY: CLASS_NAME = User
25/05/2009 11:41:03 a.m. QUERY: EVENT_ID = 0
25/05/2009 11:41:03 a.m. QUERY: SEARCH_CLASSES = User
25/05/2009 11:41:03 a.m. QUERY: SEARCH_ATTRS =
25/05/2009 11:41:03 a.m. QUERY: SEARCH_ATTRSCNT =
25/05/2009 11:41:03 a.m. QUERY: SEARCH_ATTRSCNT =
25/05/2009 11:41:03 a.m. Cannot index into a null array.
25/05/2009 11:41:04 a.m. At C:\Program
Files\Novell\WSDriver\scripts\powershell\Query.ps1 :23 char:37 +
$SEARCH_ATTRSZERO = $SEARCH_ATTRS[0 <<<< ]

If I don't assume the SEARCH_ATTRS is an array, I can get back the
SEARCH_ATTR_CN, but not SEARCH_ATTRS. Assuming I would get an array
back for the list of search attrs?

Anyone tried this before?


--
plambrechtsen
------------------------------------------------------------------------
plambrechtsen's Profile: http://forums.novell.com/member.php?userid=13537
View this thread: http://forums.novell.com/showthread.php?t=373852