Solved

Deleting SIP ID from AD

Posted on 2014-10-03
6
143 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
  • 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Adoption of Microsoft’s Enterprise Mobility and Security solution and Office 365 will re-order the File Sync and Share market Microsoft has stated that its Enterprise Mobility + Security (EMS) is the fastest growing product in the history of the …
how to add IIS SMTP to handle application/Scanner relays into office 365.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

770 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