0 votes

Hi again !

Is there a way in a BR Powershell script to get the Domain Controller Adaxes service is using for an operation. To be clearer, i use a powershell script in a BR after user creation to activate Lync account but sometimes, the script throws an error about not finding the user account, certainly because Adaxes created it on one DC and Lync powershell use another one. If i can get the DC in the context, i could pass it to the powershell cmdlet.

Thanks

Stephen

by (7k points)

1 Answer

0 votes
by (19k points)
selected by
Best answer

Try this one:

$domain = $Context.GetObjectDomain("%distinguishedName%")
$rootDse = $Context.BindToObject("Adaxes://$domain/rootDSE")
$dc = $rootDse.Get("dnsHostName")
0

Perfect ! Thanks

Related questions

0 votes
1 answer

I would like to add the following logic into a Powershell script that will be triggered on 'After Create User'. Read the value of the 'title' property of the user just created ... 'True' or 'False'. Could you assist with how to script this please? Many thanks.

asked May 1 by Bernie (1.8k points)
0 votes
1 answer

My scheduled task currently: Checks for staff in a particular OU that do not have an O365 license Adds a license Resets their AD Password Moves them to an OU based off ... scheduled task moves them out of the OU that the business rule is looking at. Thanks

asked Apr 15 by russmerriman (450 points)
0 votes
1 answer

According to this article when we disable a user we should "Disable Exchange ActiveSync and Disable OWA for Devices, and Disable email connectivity." However I can only figure ... connectivity" as well? https://support.office.com/en-us/articl ... 5eddb367d1

asked Aug 4, 2015 by auser42 (1.8k points)
0 votes
1 answer

When creating business rules I quite often find myself having to create overly complex workflows because we can't use ELSE or BREAK statements. An example would be:- ... am I missing something in how to construct business rules that mimics their use? Thanks

asked Sep 23, 2014 by firegoblin (11k points)
0 votes
0 answers

Hi, Not worked with Adaxes before and just as I joined company we've had domain migration in place. After migration, whenever we want to access Exchange properties of a user ... works fine across domain..? Any ideas, however basic they may be?? regards Robert

asked Oct 16, 2019 by roberttryba (450 points)
2,245 questions
2,007 answers
5,494 comments
19,940 users