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 ?
Modified on 2025-06-10 13:32:10 +0200
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 ?
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