Avatar of techdrive
techdrive
Flag 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
DatabasesProgrammingPowershellExchange

Avatar of undefined
Last Comment
Jason Crawford

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Jason Crawford

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
techdrive

ASKER
thank you sir
Jason Crawford

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.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy