Showing posts with label Lync. Show all posts
Showing posts with label Lync. Show all posts

Thursday, June 7, 2018

Change Sip addresses user powershell

Change old sip address to new to all users. Open skype for business powershell  and run :

$x = Get-CsUser | Where-Object {$_.SipAddress -like "*@oldSIP"}

 foreach ($i in $x)

    {
        $oldAddress = $i.SipAddress

        $newAddress = $oldAddress -replace "@oldSIP", "@newSIP"

        Set-CsUser -Identity $i.Identity -SipAddress $newAddress
    }

Saturday, February 25, 2017

Change msRTCSIP-GroupingID for multiple users

If you want In your organization to separate several Organizations from seeing each other.
You must set OU GUID  to msRTCSIP-GroupingID attribute.

After getting the OU ObjectGUID we set this GUID as the msRTCSIP-GroupingID option for all users in that OU.

to do this using powershell for multiple users:

copy OU ObjectGUID.
for example: 2DCF9FC8-CB7C-4382-AA97-EF9B890B9B6A

copy this GUID and convert this GUID to Hexadecimal

use this site:
http://www.windowstricks.in/online-windows-guid-converter

after converting we'll have C89FCF2D7CCB8243AA97EF9B890B9B6A

change this format to xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

C89FCF2D-7CCB-8243-AA97-EF9B890B9B6A


first import the AD PowerShell Module:

Import-Module ActiveDirectory

$Users = Get-Content c:\tmp\atribute.txt

ForEach ($User in $Users) {

Set-ADUser -Server test.local -Identity "$user" -replace @{'msRTCSIP-GroupingID'=[GUID]("C89FCF2D-7CCB-8243-AA97-EF9B890B9B6A")}
}