cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cleaning User - How to get login list

ponceptb
Super Contributor

Hello,

 

We would like to create a vbscript which allow to deactivate some users from Windows Login list.

In fact we will have file with this format:

 

"Windows_Login";"FullName";"Email";"Department";"Type";"PathOfEnvironment"

login1;example1;example@....com;###;***;\\fr-vfiler134\MEGA\HOPEX\IM EA

login2;example2;example2@....com;azer;sqdf;\\fr-vfiler134\MEGA\HOPEX\CTC-Prozesse

...

 

Windows Login is an attribute of MetaClass Login when we select Authentication Mode: LDAP.

 

Can we use this script?

Set cLogins = GetSelection("Select [Login] Where [Windows_login] in ('login1';'login2')")
For each oLogin in clogins
    ologin.GetProp("Statut (login)") = 0                        'active = 1 - desactive = 0 le user en question
Next

But when I try to create a request on [Login] metaclass, I get an error message.

 

Could you please help me?

 

Best Regards

3 Replies

 

I do not think "windows_login" exists in MEGA.

Are you talking about "windows login" (without the underscore) ?

If so you could write :

Select Login Where [Login Holder]:[Person (System)].[Windows login] like...

You can maybe also search directly for login :

Select Login Where name like ...

Regards,

 

Lionel

ponceptb
Super Contributor

Hello,

 

Thks for you reply.

It depends.

Normally there should not be more than 16 logins. But, even if we have more, we will split the listin order to have just 16 or less login in the txt/csv file.

 

When I make the tests in mega, I have just entered:

Select [Login] Where [Windows_login] like 'n#'

And it did not work.

 

Regards

lionel
MEGA
MEGA

Hello,

 

the only think I can tell you (and I do not know if it will solve the problem), is that your query will not work if you have more than 16 values in your set (Selet Login where Windows_login in "login1"..."login16").

So my questions is : how many values do you have ?

 

Regards,

 

Lionel