We help IT Professionals succeed at work.

Set AD Attribute msRTCSIP-DeploymentLocator

High Priority
451 Views
Last Modified: 2020-02-02
Hello Team,

We have Some ad users where we need to set the AD attribute below for bulk users

msRTCSIP-DeploymentLocator  need to be set to SRV:

first i need to fetch the users which this attribute and then in second we need the command or script to input the users to set this Attribute to SRV :

Thanks,
Addy
Comment
Watch Question

LearnctxEngineer
CERTIFIED EXPERT

Commented:
This will return all users that have a value for msRTCSIP-DeploymentLocator.
Get-ADUser -Properties msRTCSIP-DeploymentLocator -Filter {msRTCSIP-DeploymentLocator  -like "*"}

Open in new window


This will set the value to whatever you want for msRTCSIP-DeploymentLocator.
Set-ADUser -Identity xxx -Replace @{msRTCSIP-DeploymentLocator="Whatever"}

Open in new window


Or you could join them together and set via the pipeline.
Get-ADUser -Properties msRTCSIP-DeploymentLocator -Filter {msRTCSIP-DeploymentLocator  -like "*"} | Set-ADUser -Replace @{msRTCSIP-DeploymentLocator="Whatever"}

Open in new window

Andy AndyExpert

Author

Commented:
but how can i set for particular user or only for list of user ?
IT Professional
CERTIFIED EXPERT
Commented:
in PS

Get-AdUser -filter { msRTCSIP-DeploymentLocator -eq 'SRV'  } |ft Name .

This will give you the list .

(ref Tecnet )
Powershell Script to sync the attributes

Import-Module ActiveDirectory $newproxy = "domain" $userou = 'OU' $users = Get-ADUser -Filter * -SearchBase $userou -Properties SamAccountName, ProxyAddresses, msRTCSIP-PrimaryUserAddress, msRTCSIP-DeploymentLocator, msRTCSIP-UserEnabled, givenName, Surname Foreach ($user in $users) { Set-ADUser -Identity $user.samaccountname -Add @{'msRTCSIP-UserEnabled'=$TRUE} Set-ADUser -Identity $user.samaccountname -Add @{'msRTCSIP-DeploymentLocator'="SRV:"} }
Andy AndyExpert

Author

Commented:
in the input file how need to be setup a input file.  will only change the attribuet which i requested
Andy AndyExpert

Author

Commented:

thnks