troubleshooting Question

Combining output powershell into csv and html

Avatar of techdrive
techdriveFlag for United States of America asked on
PowershellExchange
1 Comment1 Solution79 ViewsLast Modified:
I have these three commands here that works well with the output.What I would like to do is combine all three of these in one script and have the out put to come out in a csv and also a html with the following



#First command
get-mailbox -resultsize:unlimited | foreach { ($_.emailaddresses -like "smtp:*").Count -gt 1 -and $_.primarysmtpaddress -match '^[\W]' -or } | Select Displayname, emailaddress, alias

#Second command
get-mailbox | foreach {$_.recipienttypedetails -like "shared*"} | Select Displayname, emailaddress, alias

#Third Command
get-mailbox -resultsize:unlimited | where {$_.displayname -notmatch '^[\W]' } | Select Displayname, emailaddress, alias




Here are the results for the first command
 
      Displayname, emailaddress, alias
      Displayname, emailaddress, alias
      Displayname, emailaddress, alias



      Here are the results for the second command


      Displayname, emailaddress, alias
      Displayname, emailaddress, alias
      Displayname, emailaddress, alias


      Here are the results for the third command

      Displayname, emailaddress, alias
      Displayname, emailaddress, alias
      Displayname, emailaddress, alias
ASKER CERTIFIED SOLUTION
David Johnson, CD
The More I know, the more I don't know
Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros