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

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

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 (60 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)
3,552 questions
3,242 answers
8,243 comments
547,828 users