Clear Note on Telephone tab

Clearing the Notes section is very like setting the initial value except we pass a simple blank string

$ou = "OU=BlogTests,DC=Manticore,DC=org"            
            
$note = " "            
            
"`nMicrosoft"            
$name = "UserA"            
Get-ADUser -Identity $name |            
Set-ADUser -Replace @{info = $note}            
            
"`nAD provider"            
$name = "UserB"            
$dn = "cn=$name,$ou"            
Set-ItemProperty -Path AD:\$dn  -Name info -Value $note  -Force            
             
"`nQuest"            
$name = "UserC"            
Get-QADUser -Identity $name |            
Set-QADUser  -ObjectAttributes @{info=$note}            
            
"`nScript"            
$name = "UserD"            
$dn = "cn=$name,$ou"            
$user = [adsi]"LDAP://$dn"            
$user.info = $note            
$user.SetInfo()

Leave a Reply