0 votes

I'm getting a syntax error on this command and I can't figure out what I'm doing wrong:

$criteria = New-AdmCriteria "user" {adm-CustomAttributeInt2 -empty $false -and accountExpires -expired -eq $false}

New-AdmCriteria : The criteria is invalid. Syntax error at position 68. At line:1 char:13

by (190 points)

1 Answer

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

Hello,

You are missing the -Expression parameter. Also, the part for account expiration is incorrect. There should be no -eq operator. Finally, it should be as follows:

$criteria = New-AdmCriteria "user" -Expression {adm-CustomAttributeInt2 -empty $false -and accountExpires -expired $false}

However, even with fixing the syntax, the criteria will not work. The thing is it is no possible to use Adaxes custom attributes in search criteria.

Related questions

0 votes
1 answer

Hi there! I'm currently running a demo of Adaxes, with the goal of having the system configured so it's our HR team creating users, rather than help desk ... to the person who created the account Any direction would be greatly appreciated. Cheers Matt

asked Aug 24, 2017 by mmcdougall (50 points)
0 votes
1 answer

I think this started happening back in August when we updated to the current version (3.13.18.106.0). We are not sure though because this only affects the web page ... We would prefer not to allow access through a firewall for this. Screenshot of the error:

asked Nov 23, 2020 by mark.it.admin (2.3k points)
0 votes
1 answer

Hey I found this code for my Custom Command to autofill Description. Does anyone know how to modify it to handle grandparent i.e. go two levels up? $parent = ... .Put("Description", $parent.Get("name")) $Context.TargetObject.SetInfo() Best Regards Debarase

asked Nov 9, 2018 by debarase (100 points)
0 votes
1 answer

I am noticing a large amount of PowerShell Transcript files in the Adaxes SA accounts Documents folder. These are different than the logging feature which has a very ... Can I configure these transcripts in any way to manage their space consumption/retention?

asked Nov 5 by SysADM (50 points)
0 votes
1 answer

Hi so if I have the web-interface setup on my internal server where I did the full install but I also have setup a RODC in DMZ how can I "merge" so that the URLS given ... get the offline/unlock that shows up to link and show/work for the web server on the DMZ

asked Nov 4 by ckelley (40 points)
3,589 questions
3,278 answers
8,303 comments
548,130 users