0 votes

We are using a script to set the phone number in a business rule after creating a user :

$user = Get-AdmUser -Identity %sAMAccountName%
Set-AdmUser -Identity $user -OfficePhone $formattedNumber

In an other script in the same business rule (but with different conditions) i want to get the setted phone number, but i can't get this to work. I tried differt things:


But both won't work, is there another option?

by (50 points)

1 Answer

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

Hello Marcel,

To achieve the desired, you need to make sure that both operations are performed on the domain controller Adaxes is connected to. The referenced lines from the first script should be replaced with below:

$Context.TargetObject.Put("telephoneNumber", $formattedNumber)

As for the second script, use the approach like below to obtain the property value:

    $telephoneNumber = $Context.TargetObject.Get("telephoneNumber")
    $telephoneNumber = $NULL

Thanks! Works :-D

Related questions

0 votes
1 answer

Hi! What am I missing, we are running 2018.2, we've edited a webform using web interface configurator. I've added the telephone field in section general under Management heading ( ... it to both modify tab and create tab. Any hints what I'm doing wrong? /Kaj

asked Jul 10, 2019 by KajLehtinen (650 points)
0 votes
1 answer

Hi! I'm new to Adaxes and this is my first post. I need som assistance on writing an entered phone number on one hand for the human eye in the telephone attribute ... keep the format including spaces, for the AD User object pleasing for the eye? Thanks, Micael

asked Jan 11, 2019 by ecit (100 points)
0 votes
1 answer

Hello I try to create a form that lets HR create a user themself, but they need the approval from the IT-Department, so the IT-Department can check the new employees personal data and configure their pc. Or do you have an alternative idea for this process?

asked May 2 by Baul (110 points)
0 votes
1 answer

Hello I tried to create a "business rule" to automatically email a designated email-adress. Thats not a problem. But i want to be able to get the "enrolled"- ... sincerely The Adaxes system Is it possible to create a business rule with the wanted parameter?

asked Apr 25 by Baul (110 points)
0 votes
1 answer

Is there a way to extend the Get-AdmGroupMember for easier cloud user management and better expressing the actual "user" object your working with? https://www ... -60d8-49a9-aebb-0000000000 SID : S-1-15-000000000000-3621557498-1235837144-3060644782-00000000000

asked Apr 1 by PeterS (40 points)
3,386 questions
3,085 answers
545,553 users