0 votes

I'm currently running a SQL SPROC from within powershell, getting a value, and attempting to assign that value to an AD attribute. Everything goes fine getting the value, but when I call this line:

>Set-AdmUser -Identity %username% -attribute "$value"

I'm informed that the Set-AdmUser cmdlet is not recognized. Which is bizarre, because I'm running this from a PS command in Adaxes.

When I launch PS on the server and load the Adaxes module, that command runs just fine. So I'm not sure what I'm doing wrong here, and I'd like to avoid calling PS from within PS to load the module and run the command.

Thanks!

by (50 points)

1 Answer

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

Hello,

The thing is that Adaxes uses PowerShell v.2.0. To use Set-AdmUser cmdlet in PS command in Adaxes you need to add the following line into the beginning of the script:

Import-Module Adaxes
0

Dangit - I thought the Adaxes module was automatically imported. That did the trick.
Thanks!

Related questions

0 votes
1 answer

Is Set-AdmUser supposed to trigger a User Update Business rule? I have a business rule that is supposed to run after a user is updated, but it doesnt appear that ... to Set-AdmUser, that it triggers the business rule afterwards. Is this working as intended?

asked Dec 12, 2014 by chazlander (120 points)
0 votes
1 answer

Hello, I'm attempting to automate a part of our user creation/modification process and I've created a script that works on the Adaxes server in PowerShell but when I ... ? The Quest Powershell commands are installed on the Adaxes server as well. Thank you!

asked May 20, 2014 by mmackay (50 points)
0 votes
0 answers

Over the last day or so we have been seeing this pop up under the exchange header in adaxes portal. cmdlet Get-CASMailbox is not present in the role definition of the current user

asked Jul 3, 2023 by Jeff.Briand (60 points)
0 votes
1 answer

So I need an approval process before adaxes executes a custom command to create a user. Basicaly an HR group and a Privacy group have to approve. what i have is set up like this ... the first one has been approved. I want them to go out at the same time.

asked Apr 14, 2023 by mightycabal (1.0k points)
0 votes
1 answer

We have just installed Adaxes for testing in our environment which has on-premise AD with Office 365 (no on-prem Exchange). Our use deprovisioning is comprised of two ... wrong, or does Adaxes not operate in a wholly Office 365 environment in this regard?

asked Sep 30, 2020 by jamiew (50 points)
3,346 questions
3,047 answers
7,782 comments
544,986 users