0 votes

Hi,
Can I use a PS script to call Adaxes with a list of users or computer and run through it? For example, PS script checks for users NotLoggedOnFor 30 days and sends this list to Adaxes to disable accounts.

by (60 points)

1 Answer

0 votes
by (216k points)

Yes, you can. Try the following script:

Import-Module Adaxes

$domainName = "domain.com";
$adaxesService = "localhost";
$dataLimit = [System.DateTime]::Now.AddDays(-30); 

Search-AdmAccount -AccountInactive -DateTime $dataLimit -UsersOnly -AdaxesService $adaxesService -Server $domainName | Disable-AdmAccount -AdaxesService $adaxesService -Server $domainName 

To search only for computers, use the -ComputersOnly switch parameter. To search for both users and computers, omit this parameter.
To get the full list of Adaxes cmdlets, use Get-Command -Module Adaxes.

In the next version that is scheduled for September (October), it will be possible to perform such activities without scripting using new feature called Scheduled Tasks.

0

Thanks for help!

Related questions

0 votes
1 answer

We try to use ADSI scripting to automate some tasks using Adaxes 2023. One such task is to try to check whether an answer provided by a user to his question is correct or not. ... . But I do not see an easy way to do this using ADSI script and/or interfaces.

asked Oct 22 by gfang (20 points)
0 votes
1 answer

Is there a way for Adaxes to use a user's Microsoft 365 profile pictures instead of having to select a file on a per user basis?

asked Feb 1 by keneth.figueroa (20 points)
0 votes
1 answer

I need to know how to Create a new Custom Attribute which I wants save some informations of Users

asked Jun 12, 2023 by kanishka.silva (40 points)
0 votes
0 answers

Hi, I'm currently working with setting up a new Adaxes solution for a customer at my company. The customer needs a solution that can add a security group with full ... help me out here :-) That would be greatly appreciated. Best Regards, Kristoffer Høie.

asked Jun 29, 2016 by krihoie (20 points)
0 votes
1 answer

Hello, currently we use powershell scripts to perform compliance critical tasks because this allows us to generate user defined entries in the windows event log. Now we would like to ... ". Is there a way to retrieve this information in the CC? Many thanks.

asked Jul 21, 2018 by HorstR (460 points)
3,569 questions
3,259 answers
8,275 comments
547,939 users