Solved

Deleting SIP ID from AD

Posted on 2014-10-03
6
146 Views
Last Modified: 2014-10-23
I currently have my office on Office 365 with DirSYNC.

We are rolling out Lync online to users. We used to have Office Communicator and the SIP ID are now a part of the users AD account.

I need to clear the current SIP ID in field msRTCSIP-PrimaryUserAddress. I know how to do this manually and Office Communicator was used a long time ago, but there are about 400 updates I would need to perform.

With DirSYNC the accounts in Office365 are locked out so the changes must be made locally and Synced up to the cloud.

I'm fairly new to scripting, so I am just starting to get the hang of things.

Thanks.
0
Comment
Question by:Mike Streett
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 16

Accepted Solution

by:
Joshua Grantom earned 333 total points
ID: 40360381
One liner

Import-Module ActiveDirectory ; Get-ADObject -LDAPFilter “(msRTCSIP-PrimaryUserAddress=*)” | ForEach-Object {Set-ADObject -Identity $_.DistinguishedName -Clear “msRTCSIP-PrimaryUserAddress”; “Removed $($_)”}

Open in new window

0
 

Author Comment

by:Mike Streett
ID: 40364302
This is great, thanks.

Just to be on the safe side what would the command be to just run it on one OU at a time.

Such as C3i TestContainer?
0
 
LVL 12

Assisted Solution

by:Jeff_Schertz
Jeff_Schertz earned 167 total points
ID: 40369069
Add the following argument after the Get-ADObject cmdlet:

-SearchBase "OU=someOU,DC=contoso,DC=com"

or if it's a default AD container (and not an OU) then:

-SearchBase "CN=Users,DC=contoso,DC=com"
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 16

Assisted Solution

by:Joshua Grantom
Joshua Grantom earned 333 total points
ID: 40369095
Sorry about that Mike, I didn't even notice that you asked an additional question, Jeff is correct though.

Import-Module ActiveDirectory ; Get-ADObject -Searchbase "CN=Users,DC=DOMAIN,DC=COM" -LDAPFilter “(msRTCSIP-PrimaryUserAddress=*)” | ForEach-Object {Set-ADObject -Identity $_.DistinguishedName -Clear “msRTCSIP-PrimaryUserAddress”; “Removed $($_)”}

Open in new window


an easy way to find the searchbase is to right click an OU or container, go to Properties > Attribute Editor, and find the distinguishedName.

In order to see the Attribute Editor, you need to have "Advanced Features" enabled from the View menu in ADUC.
0
 

Author Comment

by:Mike Streett
ID: 40400585
Thanks for the help everyone. It's nice to have some other techies to talk with.
0
 
LVL 16

Expert Comment

by:Joshua Grantom
ID: 40400604
You're welcome Mike,

I know how you feel.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article outlines the process to identify and resolve account lockout in an Active Directory environment.
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question