0 votes

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.


Thanks for help!

Related questions

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 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)
0 votes
1 answer

For instance to execute a powershell script that enable MFA for all member in that group?

asked Jan 27 by samuel.anim-addo (20 points)
0 votes
1 answer

When running a PowerShell script as an action in a custom command, you can set the script to run as a different account and then use the RunAs property in the ... Is there another way to get the Adaxes service account's credentials from within the script?

asked Mar 31, 2022 by KelseaIT (320 points)
3,164 questions
2,868 answers
505,664 users