It might be because of other reasons that you get the -1
How did you get the -1 via the BAT file that prints the errorlevel or did you
see that in Servers Alive?
If in Servers Alive, then it can also because within the .BAT file you don't
have the path to the files you're calling.
So instead of doing
DCDIAG.EXE
do
c:\directory\subdirectory\dcdiag.exe
Dirk Bulinckx.
From: Servers Alive Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Petr
Bohac
Sent: Tuesday, September 16, 2008 11:56 AM
To: Servers Alive Discussion List
Subject: RE: [SA-list] Capture external output
Hi Arnold,
that's quite strange. Can you paste here your dcdiag output? Btw this is one
command "DCdiag.exe /S:DC /TEST:fsmocheck | find "test FsmoCheck" | find /v
"failed". Basicly what does it do is to find "test FsmoCheck" line within the
output and then it will try to search for "failed" word on the same line (or
you can swap it for passed one). Regarding the result (true or false) it will
output 0 or 1 errorlevel.
Rgds,
Petr
--------------------------------------------------------------------------------
From: Servers Alive Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of
HOUTSMA Arnold
Sent: 16 September 2008 11:41
To: Servers Alive Discussion List
Subject: RE: [SA-list] Capture external output
Hi Petr,
I tried that already. It doesn’t work. It always returns -1. No matter
what I check.
Regards,
Arnold
From: Servers Alive Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Petr
Bohac
Sent: dinsdag 16 september 2008 08:51
To: Servers Alive Discussion List
Subject: RE: [SA-list] Capture external output
Try the following command: DCdiag.exe /S:DC /TEST:fsmocheck | find "test
FsmoCheck" | find /v "failed" regarding the result you will get errorlevel 0 or
1.
You can test it in command prompt running the command and then type echo
%errorlevel%. Then just make a batch file. I think it should work in salive
though I didn't test it.
Br,
Petr
--------------------------------------------------------------------------------
From: Servers Alive Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of
HOUTSMA Arnold
Sent: 16 September 2008 10:26
To: Servers Alive Discussion List
Subject: RE: [SA-list] Capture external output
Yes I want to capture the string output.
I run this command: DCdiag.exe /S:mydc /TEST:fsmocheck /F:C:\LOG\FSMO.log and
want to know if the log contains the string “passed test FsmoCheck”
or “passed failed FsmoCheck”
Are there any SA customers who are doing this test already and/or is there
another way?
Are there any COM examples?
Regards,
Arnold
From: Servers Alive Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Dirk
Sent: donderdag 11 september 2008 09:21
To: Servers Alive Discussion List
Subject: RE: [SA-list] Capture external output
If the output is send as errorlevel (that it would only be a number) then SA
can get that back via the EXTERNAL ERRORLEVEL check.
If "string" output needs to be returned to Servers Alive then you will have to
create a COM check for this.
Dirk Bulinckx.
From: Servers Alive Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of
HOUTSMA Arnold
Sent: Thursday, September 11, 2008 8:46 AM
To: Servers Alive Discussion List
Subject: [SA-list] Capture external output
Hi,
Is there a way to capture output from external commands?
I mean, I can for example execute “DCdiag.exe /S:mydc
/TEST:kccevent” that displays the result on screen or in a log but can I
sent the output through SA.
Regards,
Arnold
To unsubscribe send a message with UNSUBSCRIBE in the subject line to
[email protected]
If you use auto-responders (like out-of-the-office messages), make sure that
they are not sent to the list nor to individual members. Doing so will cause
you to be automatically removed from the list.
To unsubscribe send a message with UNSUBSCRIBE in the subject line to
[email protected]
If you use auto-responders (like out-of-the-office messages), make sure that
they are not sent to the list nor to individual members. Doing so will cause
you to be automatically removed from the list.
To unsubscribe send a message with UNSUBSCRIBE in the subject line to
[email protected]
If you use auto-responders (like out-of-the-office messages), make sure that
they are not sent to the list nor to individual members. Doing so will cause
you to be automatically removed from the list.
--------------------------------------------------------------------------------
This e-mail including any attachment is intended only for the recipient(s)
named. It may contain confidential information and should not be read, copied
or otherwise used by any other person. If you are not a named recipient, please
contact the sender and delete the e-mail from your system. The sender does not
accept any liability for errors or omissions in the content of this message or
for viruses, or any damage due to the e-mail. The recipient is advised to have
appropriate virus check software.
To unsubscribe send a message with UNSUBSCRIBE in the subject line to
[email protected]
If you use auto-responders (like out-of-the-office messages), make sure that
they are not sent to the list nor to individual members. Doing so will cause
you to be automatically removed from the list.
To unsubscribe send a message with UNSUBSCRIBE in the subject line to
[email protected]
If you use auto-responders (like out-of-the-office messages), make sure that
they are not sent to the list nor to individual members. Doing so will cause
you to be automatically removed from the list.
--------------------------------------------------------------------------------
This e-mail including any attachment is intended only for the recipient(s)
named. It may contain confidential information and should not be read, copied
or otherwise used by any other person. If you are not a named recipient, please
contact the sender and delete the e-mail from your system. The sender does not
accept any liability for errors or omissions in the content of this message or
for viruses, or any damage due to the e-mail. The recipient is advised to have
appropriate virus check software.
To unsubscribe send a message with UNSUBSCRIBE in the subject line to
[email protected]
If you use auto-responders (like out-of-the-office messages), make sure that
they are not sent to the list nor to individual members. Doing so will cause
you to be automatically removed from the list.
To unsubscribe send a message with UNSUBSCRIBE in the subject line to
[email protected]
If you use auto-responders (like out-of-the-office messages), make sure that
they are not sent to the list nor to individual members. Doing so will cause
you to be automatically removed from the list.