Link to home
Start Free TrialLog in
Avatar of techdrive
techdriveFlag for United States of America

asked on

Sql into powershell

Greetings I am using Logparser which I believe is in SQL. I have the command in SQL that runs but I was needing help either directing this back to exchange powershell  or should I get the info I need in powershell first.

logparser.exe "SELECT User-email,client-software,client-software-version as Version,client-mode,client-ip,protocol from "D:\logs\RCA*.LOG"  WHERE (operation='Connect') OR Client-Mode LIKE '%mode' GROUP BY User-email,client-software,Version,client-mode,client-ip,protocol ORDER BY User-email" -i:CSV -nSkipLines:4 -o:CSV > c:\path

The info I need in powershell is foreach {get-mailbox $_ } | select primarysmtpaddress, organizationalunit

Please help we are running exchange 2013 and I am sing logparser 2.2
ASKER CERTIFIED SOLUTION
Avatar of Jason Crawford
Jason Crawford
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of techdrive

ASKER

thank you sir
techdrive, I'm happy to hear I was able to assist.  If you found my contribution to this post valuable, please select the 'Accept Solution' link under my answer.  Thank you.