Hi,
This may be a bit of a stupid question but I could not find the answer on the documentation. I would like to know if there is a way to know the number of clients on a domain? Is there a command I can run to know? I do not want to know the number of users at this point int time but the total number of users on a domain.
From that would I be able to find the number of users or get a list of the users that have logged into the account over a specified period of time?
I am asking purely for statistical purposes.
Thanks in advance
number of users on domain
-
- Site Admin
- Posts: 2084
- Joined: Tue Sep 29, 2009 6:09 am
Re: number of users on domain
print(table.getn(Split(c_GetUserList("DomainName"),"\n")))
-
- Posts: 77
- Joined: Mon Nov 16, 2009 2:00 pm
Re: number of users on domain
Thanks for the reply. It has helped alot.
I need one more thing related to this post - Is it possible to list all the users in a domain and write the usernames to a textfile?
Thanks once again
I need one more thing related to this post - Is it possible to list all the users in a domain and write the usernames to a textfile?
Thanks once again
-
- Site Admin
- Posts: 2084
- Joined: Tue Sep 29, 2009 6:09 am
Re: number of users on domain
please check out the following lua script:
Code: Select all
local fh = assert(io.open("c:/userlist.txt", "w+"))
fh:write(c_GetUserList("DomainName"))
fh:close()
-
- Posts: 77
- Joined: Mon Nov 16, 2009 2:00 pm
Re: number of users on domain
Worked like a charm :) Thanks
-
- Posts: 77
- Joined: Mon Nov 16, 2009 2:00 pm
Re: number of users on domain
I would like to add to the below as I would not only like a list of clients on a domain but also their maximum quota.
Is this possible?
Thanks in advance.
Is this possible?
Thanks in advance.
-
- Site Admin
- Posts: 2084
- Joined: Tue Sep 29, 2009 6:09 am
Re: number of users on domain
You can get every user's disk quota like this:
Code: Select all
local strUserlist = c_GetUserList("DomainName")
local userlist = Split(strUserlist,"\n")
for _,username in pairs(userlist) do
local user = c_GetUser("DomainName",username)
local user_max_quota = user.max_quota
end