Richard Siddaway's Blog

I had a question through the blog asking how you could clear the telephone, pager and ipphone information from a user account.

Telephone information in AD appears on the General tab telephone and Other..   And on the telephone tab there is home, mobile, pager, fax and ipphone each of which can have a number of Other phone numbers added

I thought it best to write a function that clears all telephone information.  That way you can pick out the bits you need.

functionclear-telephoneInfo{[CmdletBinding()]param([parameter(ParameterSetName="ByDN")][string]$dn,[parameter(ParameterSetName="ByName")][string]$name,[parameter(ParameterSetName="ByName")][string]$ou)switch($psCmdlet.ParameterSetName){"ByDN"{$distname=$dn}"ByName"{$distname="cn=$name,$ou"}default{Write-Host"Error!!! Should not…

View original post 279 altre parole