I have the following DSQuery which outputs to a text file. I then have to pull that into a file editior and count the lines. I would like to convert this to a vbs file so I can run from a command line. The gotcha is that I am currently using findstr to filter out 'stuff'.
dsquery user dc=mydomain,DC=oc,DC=sample,DC=com -limit 0 |findstr /v /i "delete inactive SystemMailbox .adm Monitoring"|findstr /i /v "Org Accts"
Ideal output would be something like