Search found 8 matches

by bradit
30 Mar 2015 07:57
Forum: DOS Batch Forum
Topic: Read from a list of hosts instead of querying whole domain
Replies: 15
Views: 15999

Re: Read from a list of hosts instead of querying whole doma

The PsLoggedOn query that needs to be ran for each hostname in the hostlist is:

psloggedon -l \\hostname

Where hostname is the host from the input file (the input file currently contains hosts including the \\ )
by bradit
30 Mar 2015 07:51
Forum: DOS Batch Forum
Topic: Read from a list of hosts instead of querying whole domain
Replies: 15
Views: 15999

Re: Read from a list of hosts instead of querying whole doma

no jsut simply \\hostname

i.e

\\hostname1
\\hostname2
\\hostname3
\\hostname4
\\hostname5
by bradit
30 Mar 2015 06:44
Forum: DOS Batch Forum
Topic: Read from a list of hosts instead of querying whole domain
Replies: 15
Views: 15999

Re: Read from a list of hosts instead of querying whole doma

I've added // to the start of all of my hosts in hostlist.txt but now the PsLoggedOn is just giving a 'nobody' for each machine, but it is reading the hostlist. (if it can't find anyone logged on localy it will throw a 'nobody') Trouble is, one of the machines is the one I'm using so it should be gi...
by bradit
30 Mar 2015 06:37
Forum: DOS Batch Forum
Topic: Read from a list of hosts instead of querying whole domain
Replies: 15
Views: 15999

Re: Read from a list of hosts instead of querying whole doma

so, PsLoggedOn -L hostname tells PsLoggedOn to search all machines on the domain for the hostname (treating it as a username). The -L just tells it to show the local logon. It seems to be the \\ which defines the host as a host. here's the help file for PsLoggedOn: Usage: psloggedon [- ] [-l] [-x] [...
by bradit
30 Mar 2015 04:26
Forum: DOS Batch Forum
Topic: Read from a list of hosts instead of querying whole domain
Replies: 15
Views: 15999

Re: Read from a list of hosts instead of querying whole doma

Hi, thanks for the reply Foxidrive.

I've tried the change you suggested but it's just causing PsLoggedOn to hang with no output.

In the script I notice that it also tells PsLoggedOn to use %USERDOMAIN%, does this line also need to be changed to get it to read hosts from the text file?

Thanks,

Brad
by bradit
30 Mar 2015 02:42
Forum: DOS Batch Forum
Topic: Read from a list of hosts instead of querying whole domain
Replies: 15
Views: 15999

Read from a list of hosts instead of querying whole domain

Hi Guys, I've come across this batch script which essentially fires up psloggedon (by Symantec) for each IP on the domain and then neatly writes the output to a text file. I was wondering if there is a way to get it to read a lists of hosts from a text file instead so that I can query a set list of ...