Jump to content

Bulk change internal numbers


BigDaveH
 Share


Recommended Posts

  • Most Valued User

Hi,

 

We want to change our internal numbering schema and  this for about 546 users/callroutings. Manually it would mean delete the external number(s) form a user delete the internal number, add the new internal number and add the external number(s) to this user.  Cann such a thing be done with CDS ,  or can I do this directly in the Database ......

 

Kind regards,

 

David Hammink

Link to comment
Share on other sites


  • 1 month later...
  • Most Valued User

Should be easy enough to do with PowerShell.  If you put the new scheme into a csv file with the format

Name,Internal,External
Joe,100,+123-456100
Bob,101,+123-456101

Then you should be able to use the following:

$users = import-csv file.csv
foreach ($user in $users) 
{
	$userentry = get-ippbxuser -Username $user.Name
	get-ippbxpublicnumber -User $userentry|remove-ippbxpublicnumber
	get-ippbxinternalnumber -User $userentry| remove-ippbxinternalnumber
	new-ippbxinternalnumber -Internalnumber $user.Internal|add-ippbxinternalnumbertouser -userentry $userentry
	new-ippbxpublicnumber -Publicnumber $user.External | add-ippbxpublicnumber -InternalNumber $user.Internal
}

Note, I haven't tested this but it should be close.

Link to comment
Share on other sites


  • Most Valued User

thanks for your Reply,

 

I did something along those lines.

Since I'm not a powershell expert I wrote a c# program to iterate through the User and numberlist and produce new-ippbxinternalnumber and new-ippbxpublicnumber statements . Run those and it all worked out fine.

 

After that I spend most of the day changing all call routings.

 

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.