I have no problem with PutEX in this script.
Code:
BREAK ON

$ADS_PROPERTY_CLEAR = 1
;$NewHomeDrive = 'O:'
$NewHomeDrive = ''
$ = SetOption('WrapAtEol','on')
$users = GetObject('LDAP://ou=Users,ou=bla,ou=bla,dc=mycompany,dc=local')
for each $user in $users
if $user.class = 'USER'
;if $user.HomeDirectory <> ''
;$NewHomeDirectory = '\\mycompany.local\bla\home\users\' + $user.sAMAccountName
$NewHomeDirectory = ''
$HomeDirectory = $user.HomeDirectory
'Current HomeDirectory for ' +$user.sAMAccountName ' is: ' + $user.HomeDirectory ?
' - Modified to: ' + $NewHomeDirectory ?
'Current HomeDrive for ' +$user.sAMAccountName ' is: ' + $user.HomeDrive ?
' - Modified to: ' + $NewHomeDrive ?
$user.HomeDirectory = $NewHomeDirectory
$user.HomeDrive = $NewHomeDrive
$user.PutEX($ADS_PROPERTY_CLEAR,'HomeDirectory','')
$user.PutEX($ADS_PROPERTY_CLEAR,'HomeDrive','')
$user.SetInfo
;endif
endif
next

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.