$DirObj.PutEx ADS_PROPERTY_DELETE

Hi

is it possible to delete values with Powershell $DirObj.PutEx, i could not find any examples regarding powershell

Would like to remove old SMTP and SIP Adresses (but keep everything else) and add new SMTP,SIP and old mail as smtp.

	$ArrayRemoveProxyAddresses = New-Object System.Collections.Generic.List[string]
	$ArrayRemoveProxyAddresses.Add($RemoveOldSMTPAddresse)
	$ArrayRemoveProxyAddresses.Add($RemoveOldSIPAddresse)
	
	$DirObj.PutEx('ADS_PROPERTY_DELETE', 'proxyAddresses', $ArrayRemoveProxyAddresses)
	$DirObj.SetInfo()
	
	

Parents Reply
  • I have prepared it with set-aduser, but since the SDK recommends to use DirObj I wanted to understand if this can be cleared with ADS_PROPERTY_DELETE, especially also for Multi Value or then in doubt later for single value and I can then also use other ADS_PROPERTY methods later.
    Since I rename other values again with $DirObj.Put it would be nicer to use that but in doubt I have to go to Remove-QADProxyAddress or Set-Aduser.

Children