i worked before with the this script for ad directory replication status..: "repadmin.exe /showrepl mivtachim.co.il | FINDSTR /R /I /C:"fail", /C:"koko" >NUL && ECHO 2:Error || ECHO 0:OK 0:OK"

but how can get the same script at powershell ?


Article Comments

Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.

Dear Avi

Our technical support does not cover custom programming. It is possible to look for substrings with powershell with the .Contains method. It is also possible to create a control structure to either output 2:Error or 0:OK.

Powershell's If control structure is similar to the syntax used in bash, with some internet search it is easy to find examples.


Nov, 2014 - Permalink