0 votes

I am using external powershell scripts where adaxes custom attributes are used as inputs. I want to clear/modify those attributes after my external ps1 script gets executed successfully. How do I implement the same inside my external scripts thru try{}catch{} error handling method?

by (460 points)

1 Answer

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

Hello,

You can clear the attributes the same as you would do with any other attributes of AD objects. Note, however, that you are able to modify Adaxes custom attributes only when operations are performed via Adaxes service. That is, for this purpose, you'll need to use either cmdlets from Adaxes powerShell module or Adaxes ADSI API.

If you are using Adaxes PowerShell Module, you can use the Set-AdmUser cmdlet for this purpose and specify the -AdaxesService parameter when calling it, for example:

Set-AdmUser "CN=John Doe,CN=Users,DC=example,DC=com" -Clear "adm-CustomAttributeText1" -AdaxesService localhost

If you prefer using the ADSI API, you can do as follows:

$user = $admService.OpenObject("Adaxes://CN=John Doe,CN=Users,DC=example,DC=com", $NULL, $NULL, 0)

$user.Put("adm-CustomAttributeText1", $NULL)
$user.SetInfo()
0

Nice.. easy one ;-)

Related questions

0 votes
1 answer

So I need to export a list of all user's Line URI's to a CSV file. Running Adaxes 2021 Version 3.14.18804.0 (64 bit) and Teams Powershell 4.1.0 ... a Microsoft 365 account } finally { # Close the connection and release resources Disconnect-MicrosoftTeams }

asked Aug 4, 2022 by TheLexicon (200 points)
0 votes
1 answer

This may sound a little convoluted, but I will try and explain. I'd like to have an operation require approval by a group. And if the initiator is a member of that group, I don ... into it at a new company. I've got to dust off some of the brain cells. Thanks.

asked Jul 17 by wd.swaters (40 points)
0 votes
1 answer

HI support, I just have a question about deprovisioning Users. After I deleted a user from the Active Directory, it can be, in some Cases, the I have to restore them. ... Adaxes Custom Attribute are lost. Is there a way to get it back? Sincerely yours, Chris

asked Feb 10, 2020 by Napoleon (700 points)
0 votes
0 answers

By default, Web Interface URLs look like the following: http://host.company.com/Adaxes/HelpDesk. For the URLs not to contain the Adaxes part: On the computer where Adaxes ... C:\Program Files\Softerra\Adaxes 3\Web Interface by default. Click OK. Restart IIS.

asked Oct 30, 2019 by Adaxes (560 points)
0 votes
1 answer

Hi, I need to start Adaxes scheduled task from Powershell console running on another host. How can I do that?

asked May 21, 2020 by KIT (960 points)
3,538 questions
3,229 answers
8,224 comments
547,747 users