0 votes

Hi

I am trying to export a list of all active/enabled users, how can you do it with get-admuser?

by (50 points)

1 Answer

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

Hello,

The syntax is almost the same:

Import-Module Adaxes
Get-AdmUser -Filter '(Enabled -eq $True)'
0

Hello

How can you run -searchbase to multiple OU's?

I tried to run -Searchbase "OU=x, OU=x, OU=x, DC=X, DC=X", "OU=x, OU=x, OU=x, DC=X, DC=X""

but gets error cannot convert 'system.object to the type system string required by parameter 'searchbase'. specified methor not supported

0

Hello,

It is not possible to pass multiple OUs as the search base. Use the following script to achieve what you want:

Import-Module Adaxes

$ouDNs = @("OU=Sales,OU=Users,DC=example,DC=com", "OU=IT,OU=Users,DC=example,DC=com")

$allusers = @()
foreach ($dn in $ouDNs)
{
    $allusers += Get-AdmUser -Filter '(Enabled -eq $True)' -SearchBase $dn -SearchScope Subtree
}

Related questions

0 votes
1 answer

I need to send an e-mail to the owner ("managed by") for each group. The e-mail should contain a list of group members. What is the best way to do that?

asked May 9 by akindy (20 points)
0 votes
1 answer

It would be good to have a selectable column for the tasks schedule pane. This would allow us to easily show tasks scheduled dates and give us the ability to sort by the ... case it would be good to sort all of these password resets by their scheduled date.

asked Apr 30 by Moodie007 (60 points)
0 votes
1 answer

Using the powershell module, I know how to create a scheduled task, and also how to bind to a scheduled task that is already known. I also have used code to try creating ... same time as another. These are all one-time tasks and will be removed once executed.

asked Jan 19 by aweight (40 points)
0 votes
1 answer

I need to add many check-box list items to a Custom Command, I think the best way to do this is via PowerShell rather than through the UI. What's ... Softerra.Adaxes.Interop.Adsi.Parameters.IAdmParameterCheck[]]$ItemsList # Also doesn't work $command.SetInfo()

asked Jan 4 by Viajaz (210 points)
0 votes
1 answer

Hello, I am trying to do as best as I can researching the best and effective way to manage the properties of Office 365 Exchange Properties with Adaxes (Latest Version) ... sure if there is a command or config I missed for adjusting the Distribution Lists.

asked Dec 19, 2023 by Edogstraus00 (470 points)
3,371 questions
3,069 answers
7,815 comments
545,353 users