Here is an example of how to GET the value for a troublesome property with an operator in the name:
 Code:
Break ON
 
$objSysInfo = CreateObject("ADSystemInfo") 
$strUserDN = $objSysInfo.userName 
$oADObject = GetObject("LDAP://" + $strUserDN)

$sAttribute="uwh-department1"
"Current value of '"+$sAttribute+"'="+$oADObject.Get($sAttribute)+@CRLF


The corresponding action to write a property is .Put() or .PutEx() followed by .SetInfo()

More information here: http://msdn.microsoft.com/en-us/library/aa705950(VS.85).aspx


Edited by Richard H. (2010-03-11 03:25 PM)
Edit Reason: Changed term "attribute" to "property" as it's more appropriate