Get-Mailbox PS command import/export csv - need help

Greetings,
I know this should be simple but I'm having trouble.  I have about 500 users that have left the company and I want to verify their Exchange 2010 mailbox have been disabled.  If I just run the basic command "Get-Mailbox -identity alias"
I see all I need to see.  The Name, Alias, and ServerName (that their mailbox is on).  If I check someone whose mailbox has been disabled I get "object could not be found."  Perfect, then I know their mailbox no longer exists. 
In trying to import a csv file of the 500 users - and export it I'm having trouble. There are a few posts on these forums for similar issues but none are working or the conditions are different.  I'm not too good and PS scripting so I am hoping someone
can assist.  I pieced this together.
import-csv C:\temp\DisabledMBs.csv | get-mailbox >c:\temp\DisabledMBsOutput.csv
The csv output file is blank.  The PS screen outputs this error for each user.
The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    + CategoryInfo          : InvalidArgument: (@{Name=Heaton; ...er Logon Name=}:PSObject) [Get-Mailbox], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Get-Mailbox
I guess I'm missing something here but stuck.  Any help is greatly appreciated!
thank you!

If you use a CSV for input, you need to tell the Get-Mailbox command what field is the identifier.  So if you have an alias field in your CSV, you would run your command as follows:
import-csv C:\temp\DisabledMBs.csv | % { get-mailbox $_.Alias } | Export-Csv c:\temp\DisabledMBsOutput.csv -NoTypeInformation
BTW, you'll notice that I've also piped your output to the Export-Csv command.  If you just pipe the output of Get-Mailbox to a file with a CSV suffix, you don't get a CSV - you get a text file with only one field named "Name                     
Alias                ServerName       ProhibitSendQuota" (note, not "Name", "Alias", "ServerName", and "ProhibitSendQuota"
separately).

Similar Messages

  • My daughter has spitefully changed my password and has refused to tell me. I have so much medical information that I can not lose. Is there anyway to get around this problem. Please I need Help fast.

    My daughter has spitefully changed my password and has refused to tell me. I have so much medical information that I can not lose. Is there anyway to get around this problem. Please I need Help fast.

    Connect the iPod to your syncing computer and restore it via iTunes.  However, if iTunes asks for the unknown passcode you need to place the iPod in recovery mode and then restore the iPod from backup.  For recovey mode see:
    iPhone and iPod touch: Unable to update or restore
    "If you cannot remember the passcode, you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and resync the data from the device (or restore from a backup). If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present. Refer to Updating and restoring iPhone and iPod touch software."
    Above is from:
    http://support.apple.com/kb/ht1212

  • After entering the redemption code from Adobe Photoshop CC, I keep getting an error saying "This card was purchased in a country that does not match your Adobe ID. You can try signing in with a different Adobe ID or get in touch with us if you need help."

    Hi. I'm a Mac user. After entering the redemption code from Adobe Photoshop CC, I keep getting an error saying "This card was purchased in a country that does not match your Adobe ID. You can try signing in with a different Adobe ID or get in touch with us if you need help." What should I do?

    Did you purchase the software in another country than where you live?

  • I bought an iPhone recently and since  then I cannot get my email on my MacPro laptop-need help please

    I bought an iPhone recently and since  then I cannot get my email on my MacPro laptop…need help please

    Good day colletteA11,
    If you are having an issue with being unable to receive email on your MacBook Pro, I would suggest that you troubleshoot using the steps in this article - 
    Mail (Yosemite): If you can’t receive messages
    Thanks for using Apple Support Communities.
    Safe computing,
    Brett L 

  • Get-mailbox powershell command

    Hi,
    I am trying to to create a power shell script to display the information as per below, any help would be greatly appreciated. Also is it possible to have another column to show if user is disable in AD or not,
    regards,
    Hazey
    Get-Mailbox
    foreach
    $DisplayName
    =Select-Object
    DisplayName
    $PrimarySMTPAddress
    =Select-Object
    PrimarySMTPAddress
    $IssueWarningQuota
    =Select-Object
    IssueWarningQuota
    $ProhibitSendQuota
    =Select-Object
    ProhibitSendQuota
    $WhenCreated
    =Select-Object
    WhenCreated
    $lastlogontime
    =get-MailboxStatistics
    |
    Select-Object
    lastlogontime
    $ItemCount
    =get-MailboxStatistics
    |
    Select-Object
    ItemCount
    $TotalItemSize
    =get-MailboxStatistics
    |
    Select-Object
    TotalItemSize
    $AdGroups
    =(Get-QADUser).memberof
    | Get-QADGroup|
    select
    name
    Export-Csv
    -Path
    c\results.csv
    -NoTypeInformation
    -append

    Save the complete Script as a GetMailboxInfo.Ps1 File. Open Exchange Management Shell as administrator and run this PS1 File. Reply back in case if the you see any errors while the script execution.
    $Global:Report = @()
    Function GetMailboxDetails($List)
    Write-Host -ForeGroundColor YELLOW "Import Active Directory Module"
    Import-Module ActiveDirectory
    foreach($Line in $List)
    $GroupInfo = @()
    $CurrentMailbox = $Line.Alias
    $MailboxObj = "" | Select DisplayName,Alias,PrimarySMTPAddress,SAMACcountNAme,Database,IssueWarningQuota,ProhibitSendQuota,WhenCreated,ExchangeUserAccountControl,TotalItemSize,LastLoggedOnBy,MemberOf
    $MailboxObj.Alias = (Get-Mailbox $CurrentMailbox).Alias
    $MailboxObj.DisplayName = (Get-Mailbox $CurrentMailbox).DisplayName
    $MailboxObj.PrimarySMTPAddress = (Get-Mailbox $CurrentMailbox).PrimarySMTPAddress
    $MailboxObj.SAMACcountNAme = (Get-Mailbox $CurrentMailbox).SamAccountName
    $MailboxObj.Database = (Get-Mailbox $CurrentMailbox).Database
    $MailboxObj.IssueWarningQuota = (Get-Mailbox $CurrentMailbox).IssueWarningQuota
    $MailboxObj.ProhibitSendQuota = (Get-Mailbox $CurrentMailbox).ProhibitSendQuota
    $MailboxObj.WhenCreated = (Get-Mailbox $CurrentMailbox).WhenCreated
    [String]$AccountControl = (Get-Mailbox $CurrentMailbox).ExchangeUserAccountControl
    $MailboxObj.ExchangeUserAccountControl = "DISABLED ACCOUNT"
    If($AccountControl -eq "None")
    $MailboxObj.ExchangeUserAccountControl = "ACTIVE"
    $MailboxObj.TotalItemSize = (Get-MailboxStatistics $CurrentMailbox).TotalItemSize
    $MailboxObj.LastLoggedOnBy = (Get-MailboxStatistics $CurrentMailbox).LastLoggedOnBy
    $DLGroupMembership = (Get-ADUser $Line.SamAccountName).MemberOf
    for($i = 0;$i -lt $DLGroupMembership.Count;$i++)
    $GroupInfo += $DLGroupMembership[$i]
    $GroupInfo += ","
    $MailboxObj.MemberOf = $GroupInfo
    $Global:Report += $MailboxObj
    # MAIN #
    "`n+++Gathering Mailbox Info..."
    $MailboxList = Get-Mailbox -ResultSize Unlimited | Select DisplayName,Alias,PrimarySMTPAddress,SAMACcountNAme,Database,IssueWarningQuota,ProhibitSendQuota,WhenCreated,ExchangeUserAccountControl
    GetMailboxDetails $MailboxList
    Write-Host -ForeGroundColor GREEN "Exporting Report to CSV File..."
    $Global:Report | Export-Csv MailboxInfo.Csv -NoTypeInformation

  • ABAP command IMPORT/EXPORT

    Hi!
    I would like to know whats the replacement for the IMPORT and export commands used in 4.7c  in ECC6. Can anyone tell me whats the replacement commands for import and export command that is used in abap/4 4.7c for ECC6.
    Thanks

    Hi Aarav,
    there is nothing like replacement for import/export.there is another statements to transferdata which are Set/Get.
    when you are working with sap you have sessions.so in between session if you want to transfer data then you will use set/get parameters.import/export are used within the session.means you opened se38 and written a program and then go back to se38 initial screen and entered another program name and in that program you want the data which is in the previous program you have written in the se38 in same session.
    reward points if helpful.

  • Getting an error while importing/exporting the universe from my BO Designer

    Hi,
       I am facing a issue while importing/exporting the universe from my BO Designer to the Server.The error is mentioned below.
       'File Repository Server Input is down'
       Once I click the OK button on this error message, it displays  the message
       'Could not import the Universe'.
      I tried the check the status of the File Repository Server (Ouput and Input) and also the of the Root Directory on the  Physical Server and also my machine.They all have read-write access.
    Installed Version of the Universe Designer Client: Business Object XI Release 2 SP3
    Installed Version of the BO Enterprise Server: Business Object XI Release 2 SP2
      Can you please help me to resolve the issue

    Hi,
       The step you have mentioned may not be applicable to my issue as one of my colleagues can import/export the universe from the same server
    The second thing is that a DB2 Client v9 is installed on both mine and my colleagues system.The Designer software can recognise the DB2 drivers on his system but it cannot recognise the same drivers on my system.I even checked the versions of the BO software installed on his and my system and they are same.
    The only difference is that his machine is a Windows XP Machine and mine is a Network Desktop.
    Will any of the above two things will affect the operation of the BO Designer.
    Thanks
    Prabhakar Korada

  • Lightroom won't export..need help asap please

    I was
    in the process of exporting some edited photos. After I opened the Export menu I decided to rename the file I had originally downloaded
    the files from into Lightroom and that I was going to download the edited photos into as a subfile.
    Well when I did that I think I broke the link and now they will not export. When I choose a photo in Lightroom in this batch and I click on the export button it will not even open the export menu.
    The export menu works fine will all my other files. 
    How do I reestablish the link or get Lightroom to recognize the files so I can export them....I am in a bind I need to get this wedding finished today.
    Appreciate any help.

    If you rename an image or move it to a different location, you can re=link it via the ? on the image thumbnail or by right-clicking on the thumbnail and choosing the Locate option.
    If you rename the container the images are in (a "file" in your terminology, or a "folder" in normal terminology) or move the container that the images are in to somewhere else then you can re-link the container by right-clicking on the folder-name in the folder list at the lefthand side and choosing the Locate option.
    It seems like you're referring to "folders" as "files" so it is confusing when LR asks you to find the folder. 
    Perhaps if you tell us the names of an example image and the name of its container before and the names of things after the rename or move, more explicit instructions can be given.
    Or maybe it's been 4 hours and you've given up and re-imported and re-edited all your images.

  • Hp Pavilion a6863w getting disc boot error..can't get windows vista to open...need help diagnosing

    My computer will not open Windows Vista.. I get a disc boot error. I have run a few diagnostics but need help to preceed. Have important files on the computer I need access to. Can anyone help walk me through the process? Thanks  Also when I look at the check s that have been done it says something about a registry problem.  HP Pavilion a 6863w 
    {Edited for privacy}

    Have you run a Hard Drive test in BIOS?
    Jennifer P
    I work for HP.
    Please select the "Accept as Solution" button on the post that best answers your question. Also, you may select the "Kudos" button on any helpful post to give that person a quick thanks

  • Problems with exporting. Need help fast

    So I recorded some video game footage (Battlefield 4) and when I look at the raw file, it says it's 1920x1080. I edited it and finished it and even if I look in info it says that it's 1920x1080.
    But when I try to export the video it says that the source file is 1280x1080
    So when I export it, it is in REALLY bad quality and I usually upload high quality videos! What do I do? I need help, fast! I have Adobe Premiere Pro CS6.
    I have a i7 3770k CPU so I don't think that is an issue. 8GB of ram aswell.

    Quickest way:
    Get Started with Premiere Pro
    New to Premiere Pro? Get started with your first project — editing a video. In less than an hour, you'll learn to edit together different types of media to tell a video story.  

  • I bought a hp d3000 and can'nt get it to download to premiere elements,need help!

    I bought a hp d3000 and can'nt download to preiere elements 11. need help!

    rik46
    As for the video specifications for your HP D3000. From what I read, you are either shooting 1280 x 720 at 30 frames per second or 640 x 480 at 30 frames per second. And, your video is MotionJPEG.avi. Can you confirm that?
    http://www.futureshop.ca/en-CA/product/hewlett-packard-hp-16-1mp-21x-optical-zoom-digital- camera-d3000-black-hpd3000/10239990.aspx
    If you are shooting 1280 x 720 at 30 frames per second, I would suggest the following, whichever works:
    a. transfer the video from the camera to a computer hard drive save location.
    b. Open Premiere Elements 11, go to File Menu/New/Project and in the new project dialog set the project preset YOURSELF to NTSC HDV HDV 720p30, making sure that you place a check mark next to "Force selected Project Setting for this project". Then via ADD MEDIA, Files and Folders, browse to an bring your MotionJPEG.avi into the project (Project Assets).
    or
    a. if doable, attach at USB cable from your camera's USB 2.0 port (it has one according to what I read online) to the computer USB 2.0 or 3.0 port
    b. then open a Premiere Elements 11 new project - File Menu/New/Project and in the new project dialog set the project preset YOURSELF to NTSC HDV HDV 720p30, making sure that you place a check mark next to "Force selected Project Setting for this project". Then via ADD MEDIA, "Vidoes from Flip or Camera"/Video Importer and its Advanced Dialog bring your video into the project.
    In these cases the project preset will match your source media (no black borders in the monitor space when you edit). If the program has a problem selecting the project preset, as it wants to do, you will probably end up with the default 1080i30 instead of 720p30 unless you step in and do this project preset setting yourself.
    Please review and let us know the outcome.
    Thanks.
    ATR

  • HT5653 the import photo button does not work!  so I see the photos but cannot import them?  Need help

    after connecting i5 to MAC my photos will show but cannot push import button to initiate.. This is first time it does that.  Need help to transfer and save my photos from my iphone

    Can you do it with Image Capture (in your Applications Folder)

  • IMPORTANT,, PLEASE I NEED HELP TO GET MY FLA FILE BACK.

    I lost my fla file!!! the due date of my project tomorrow... I need the script please. How to get my fla file back from my iPad? I published it before I lost my fla file pleaaaaaase HELP!!!!
    PLEASE EXPLAINE FOR ME HOW? It was a recovery file and I saved it then I lost it,, I work in mac.

    you should be able to reconstruct your fla file from a published non-encrypted swf version you have, by using sth like this:
    http://www.sothink.com/product/flashdecompiler/

  • I cannot get Camera Raw 8.4 to install - need help

    Like many people, I'm not getting the Camera Raw 8.4 update in Photoshop CC.
    I tried to manually install by using the link provided and when I unzip the setup.zip file and run it, it says the patch is not applicable.
    I tried completely uninstalling Bridge and Photoshop CC including "settings" and I just re-installed Photoshop CC from Creative Cloud Desktop and I still have Camera Raw 8.3.
    Is there any other dependency on Camera Raw that I should uninstall?
    How can I completely remove Camera Raw?
    Why doesn't it get updated if I re-install Photoshop CC?
    Thanks,
    Frank

    Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (later)
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support (if this won't uninstall move on to the next item)
    Bonjour
    Apple Application Support
    Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
    The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See this user tip for a suggested technique.
    Please note:
    Some users may need to follow all the steps in whichever of the following support documents applies to their system. These include some additional manual file and folder deletions not mentioned above.
    HT1925: Removing and Reinstalling iTunes for Windows XP
    HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
    tt2

  • Unable to get page with video to validate and need help getting text to display correctly

    I need advice on getting a page to validate that has a video. I didn't make the video, but all other pages vallidate that don't have it.
    Also, when testing viewing on ie with large font view the navigation bar on the left doesn't display correctly. I've tried all fixes I can think of, but none work.
    As always any advice is greatly appreciated.
    page can be viewed at: http://www.lotusvalleydesigns.com/previewpages/services.html

    Eeeeeuuuuu yuck.  You know, I've never used that setting in IE and I don't think I ever will again.
    Look what happens to CNN's website when you do that.
    http://CNN.com
    I think IE sucks and this is another fine example of MS's zeal to pile on user options that no one should use.  If MS made their zoom feature optional the way Firefox does, nobody would ever need this atrocious "accessibility" option.
    Good luck,
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

Maybe you are looking for

  • Free goods linked to volume

    Hello, Any body has faced with this requirement. Free good to be given to customer by calculating the total volume in the sales order. For e.g. in the sales order, multiple products are entered, and if the customer shall qualify for Free goods, the t

  • Classpath for web-application.

    I am working on a web application with a bunch of jsp files using some java classes. I am using tomcat 5.5. I have a special class file, say a.class, sit in the web-inf/classes. This class import another two jars, say b.jar and c.jar. The jsp file wi

  • Flashback query vs. flashback versions query

    I have noticed that I can do a regular flashback query as far back as I have UNDO data available for the query, as long as long as the table definition has not changed. Flashback versions query, however, is limited to the UNDO retention parameter. So

  • Web Service config problem

    Hello, I have configured a Web Service but I am stuck at the Url format. This should be the format: http://host:port/XISOAPAdapter/MessageServlet?channel=party:service:channel My problem is that I do not know the default port for Web Services and I d

  • Thread pool

    Hi everybody. How can I change the number of threads available in the thread pool in the JRE ? Any hint is very welcome. Best regards Susanne