[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

powershell get-mailbox database from a csv

Posted on 2016-10-31
1
Medium Priority
?
497 Views
Last Modified: 2016-10-31
cant see where i messed up any help?

Import-Csv “C:\Temp\username.csv” | ForEach-Object -Process {Get-Mailbox $_.Name | fl database} | Export-CSV “c:\temp\list.csv” -notype
0
Comment
Question by:Jorge Ocampo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 85

Accepted Solution

by:
oBdA earned 2000 total points
ID: 41867360
You've used "Format-List" ("fl") in the middle of a pipeline. Use Select-Object instead.
Import-Csv “C:\Temp\username.csv” | ForEach-Object -Process {Get-Mailbox $_.Name | Select-Object -Property database} | Export-CSV “c:\temp\list.csv” -notype

Open in new window

Rule of thumb: use any "Format-" cmdlet only ever as the last command of a pipeline.
1

Featured Post

Looking for the Wi-Fi vendor that's right for you?

We know how difficult it can be to evaluate Wi-Fi vendors, so we created this helpful Wi-Fi Buyer's Guide to help you find the Wi-Fi vendor that's right for your business! Download the guide and get started on our checklist today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question