Need action script to delete obsolete operators

HI all, I lately saw that accumulation of obsolete operators site at relays is causing actions to go in waiting state. I tried resetting the relay but it did not work out much. I also found the number of obsolete operators but need them to delete in the form of an action script and have the below line as an example:-1:

administrator delete “__op_10” on {parameter “action issue date” of action}" for client

Please suggest as the above line is failing to delete the operator. Suggest what can be used as an alternative command in action script to delete the obsolete operators.
Thank You.

Do these operators still exist in the server/console?

No they don’t exist on console. The entries of obsolete operators looks to be a stale entries which should have been removed.

Ok, thanks, and yes I have seen similar in the past.

I’ll check my action script that does this cleanuo for me, but at first glance yours looks correct - except for a missing doublequote in front of "{parameter "action issue date" of action}"

Have you already found a way to identify which obsolete operators are present on your clients? I have a session relevance for that too that I will find and post if it’s helpful.

Thank you Jason, It will be helpful to get the relevance to find the obsolete operators and I will try the action using the double quotes as mentioned.

Yes, I have a way to find the obsolete operators via below mentioned DB query :-

SELECT TOP 10000 [Username]
,[MastheadUsername]
,[UserCreationTime]
,[LastLoginTime]
,[UserID]
,[IsDeleted]
FROM [BFEnterprise].[dbo].[USERINFO] where IsDeleted = 1

1 Like

I ran the below mentioned command in fixlet debugger to execute as an action but it gave "Unimplemented command ‘administrator delete’

administrator delete “__op_10” on “{parameter “action issue date” of action}” for client

Please suggest and check if it works at your end? Ty

My bad, its working, thank you.

Is that on Windows or Linux endpoints, and what version of client? If I recall correctly the script I was using to cleanup operators worked on Windows but not on Linux, with the same error I think, and I didn’t have enough Linux clients in that deployment to continue working on it, just did a besdata reset on those.

The Session Relevance I’m using to find them is

unique values whose (it is not contained by set of masthead operator names of bes users) of values  of results of bes properties whose (reserved flag of it and name of it = "Client Administrators")

That identifies operators that are deleted AND still subscribed by at least one endpoint. To take that a bit farther, I also have this that I use to create the Relevance that I use in the task to remove those operators -

Generate Fixlet Relevance for unsubscribing operators:

"exists administrators whose (not exists effective date whose (it > %22" & now as string & "%22 as time ) of it AND name of it is contained by set of (" & concatenation ";" of ("%22" & it & "%22" ) of unique values whose (it is not contained by set of masthead operator names of bes users) of values of results of bes properties whose (reserved flag of it and name of it = "Client Administrators") & ")) of client"

Results in:

exists administrators whose (name of it is contained by set of ("__op_157")) of client

And the following generates the ActionScript I used in my task:

("setting %22__Group___AdminBy_" & it & "%22=%22{ false }%22 on %22" & now as string & "%22 for client";"administrator delete %22" & it & "%22 on %22" & now as string & "%22") of unique values whose (it is not contained by set of masthead operator names of bes users) of values of results of bes properties whose (reserved flag of it and name of it = "Client Administrators")

results:

setting "__Group___AdminBy___op_157"="{ false }" on "Fri, 05 Apr 2019 08:55:41 -0500" for client
administrator delete "__op_157" on "Fri, 05 Apr 2019 08:55:41 -0500"

Edit: In case it’s not obvious, we are well into undocumented/unsupported territory here, so please do your own testing and use with care!

1 Like

Thanks a lot for sharing the information Jason, I will definitely try that.