Powershell-Putting user mailbox to E-Discovery and in-place hold

Our org using office 365 and exchange on premise server, i asked to automate account termination. Per process each account is already enabled for litigation hold. During exit we have to put this mailbox to e-discovery and in place-hold. I tried PowerShell
command and failed to execute, Can you please provide PowerShell script to execute user "test.india".
When helpdesk supplies user name, PowerShell command starts and put this user in e-discovery with 2555 days retentions period. Please help as am new to PowerShell.
Thanks
TechRoute

"failed to execute" is a little vague. Was there an error message? 
One common mistake which I made when setting this up for myself is that you have to specify a target mailbox. 
New-MailboxSearch <employeeName> -SourceMailboxes <employeemailbox> -TargetMailbox "Discovery Search Mailbox"
Start-MailboxSearch <employeeName>
Works for me.

Similar Messages

  • How to use Powershell to set delegate for user mailbox in Exchange 2010 and Office 365

    Hello,
    Can you please tell me if I can set delegate for user mailbox in Exchange 2010 or Office 365 using Powershell?
    If I can, then how can I do that? (which Powershell commands for setting the delegate?)
    Many thanks, and have a good day!

    Hi,
    If you wanted to add a delegate to possiblly a large number of users or you do this during mailbox provisioning. So the following script will use
    impersonation to access another users mailbox and add a delegate.
    $mbtoDelegate = "[email protected]"
    $delegatetoAdd = "[email protected]"
    $dllpath = "C:\Program Files\Microsoft\Exchange\Web Services\1.0\Microsoft.Exchange.WebServices.dll"
    [void][Reflection.Assembly]::LoadFile($dllpath)
    $service = new-object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2007_SP1)
    $windowsIdentity = [System.Security.Principal.WindowsIdentity]::GetCurrent()
    $sidbind = "LDAP://<SID=" + $windowsIdentity.user.Value.ToString() + ">"
    $aceuser = [ADSI]$sidbind
    $service.AutodiscoverUrl($aceuser.mail.ToString())
    $service.ImpersonatedUserId = new-object Microsoft.Exchange.WebServices.Data.ImpersonatedUserId([Microsoft.Exchange.WebServices.Data.ConnectingIdType]::SmtpAddress,
    $mbtoDelegate);
    $mbMailbox = new-object Microsoft.Exchange.WebServices.Data.Mailbox($mbtoDelegate)
    $dgUser = new-object Microsoft.Exchange.WebServices.Data.DelegateUser($delegatetoAdd)
    $dgUser.ViewPrivateItems = $false
    $dgUser.ReceiveCopiesOfMeetingMessages = $false
    $dgUser.Permissions.CalendarFolderPermissionLevel = [Microsoft.Exchange.WebServices.Data.DelegateFolderPermissionLevel]::Editor
    $dgUser.Permissions.InboxFolderPermissionLevel = [Microsoft.Exchange.WebServices.Data.DelegateFolderPermissionLevel]::Reviewer
    $dgArray = new-object Microsoft.Exchange.WebServices.Data.DelegateUser[] 1
    $dgArray[0] = $dgUser
    $service.AddDelegates($mbMailbox, [Microsoft.Exchange.WebServices.Data.MeetingRequestsDeliveryScope]::DelegatesAndMe, $dgArray);
    Hope this helps.

  • User mailbox, Send Items = 50000 and SOAP = Slowly

    GW12SP1
    GWWebAccess(server1_oes2_sp3)------SOAP[ethernet]-------->GWPOA)SERVER2_oes2_ext3
    User mailbox have 50000 items in the sendmails folders..
    When from the GWWebAccess open this folder - user wait answer 5...8 Sec ...
    When use GW2012sp1 windows client )online - all Fast..
    How i can incrise SOAP perfomance ??
    Serg

    skoltogyan,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://www.novell.com/support and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Forums Team
    http://forums.novell.com

  • In-place archive and in-place hold

    Hello,
    I have a question concerning the archiving of the Recoverable items folder.
    The question refers to Exchange 2013 SP1 and in-place archive in coherency with in-place hold.
    First of all I have an active in-place archive with the default retention policy.
    Futhermore a Time-based In-Place Hold is enabled.
    So if I hard delete a item its moves to the DiscoveryHolds folder, by reason of the in-place hold.
    As the "DiscoveryHolds" Folder is a subfolder of the "recoverable items", will the hard-deleted email be moved to the users in-place archive according to the Retentiontag of the "recoverable items" folder?
    If not, is there any possibility to ensure that hard-deleted items which are being kept in the database by in-place hold are being moved to the archive? We want to assure that items, which are being deleted by the user, do not remain in the
    users active mailbox, but are being moved to the archive mailbox DiscoveryHolds folder to keep the active mailbox database "tidy".
    Thanks!

    Hi,
    If set a retention policy for recoverable items folder, then the In-Place Hold will not prevent the items being moved from the primary mailbox's recoverable items folder to archive mailbox's.
    Here is a related thread for your reference.
    http://social.technet.microsoft.com/Forums/systemcenter/en-US/635c9357-d0f1-4de6-b8f4-5f78867d2f19/rolling-inplace-hold-archive-mailbox-interaction?forum=exchangesvradmin
    More information for your reference.
    http://technet.microsoft.com/en-gb/library/ee364755(v=exchg.150).aspx
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • Shared mailbox shows emails and subfolders of the users mailbox in Outlook

    After We migrated the Exchange from 2010 to 2013 any shared mailbox has been migrated  is showing the inbox and all the subfolders from the user's mailbox in Outlook, instead of the shared mailbox content.
    note: if we create new shared mailbox it works fine without any issue.
    We have tried to removed full access permissions and re-added full access permissions, disabling AutoMapping and then added the shared mailbox manually in Outlook and that works fine but it is not a solution for us as we have 400+ shared mailbox and
    we cannot do it for every user have access on each shared mailbox.
    any ideas.
    Ayman Saleh

    Hi,
    Please check if this issue persists in Outlook online mode.
    After you remove the full access permissions, the shared mailbox will disappear from Outlook automatically. When you add the full access permission then, the shared mailbox will appear again in Outlook. There is no need to add shared mailbox manually.
    Please remove the full access permission and then re-add the full access permission. This time, you can make use of the AutoMapping feature to check if shared mailbox display properly.
    Best regards,
    Belinda Ma
    TechNet Community Support

  • Powershell export User properties and policy settings

    is there a Powershell script "out-there" that export and import all the user properties from the User Profile service Application - including their individual placement on the various sections (contact, basic, details etc), and also including their
    policy settings (only me /everyone/replicate settings) - basic all the settings - and if the AD mapping is there as weel it would be nice...
    So I can export from environment A and then import them to environment B... ?

    Did you try this blog:
    POWERSHELL TO EXPORT / QUERY ALL USER PROFILE PROPERTIES AND AD MAPPINGS
    http://www.sharepointfix.com/2012/01/powershell-script-to-print-user-profile.html
    also
    SharePoint 2010: Updating User Profile Properties with PowerShell
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Outlook 2013/ Exchange 2010 User Mailbox reached Limit and OWA is not reachable

    Hello Folks,I have a strange Outlook/ Exchange problem with one of our Users, interestingly it’s the Boss of our company….The Background:- We have 2 Domains @company-1 or @company-2- We have 1 Exchange 2010 Server Version 14.03.0224.002- Till March of this year our Emails where hosted externally, we used to download the Emails every 2 minutes from POP3 Mailboxes into Exchange- We have 18 Users- So every User had a User account on our Exchange and a Mailbox externally- Now we host our Emails our self via MX and DNS Records(mail.company.cc)- The User kept their Exchange accounts, OWA is now working too So far all works well on my little Server farm.The Catch:Usually our users have only one Email address either @company-1 or @company-2 Except our Boss and one other User, they have an Email address in both Domains They have addresses one...
    This topic first appeared in the Spiceworks Community

    Hi,
    I suggest to repair .ost file to check this issue by the following steps:
    Exit Outlook.
    In Control Panel, click or double-click Mail.
    In the Mail Setup dialog box, click E-mail Accounts.
    Click the Data Files tab, select the Exchange account, and then click
    Open File Location. A file explorer window opens to the location of the data file for the Exchange account. The
    Account Settings and Mail Setup dialog boxes will remain open, behind the file explorer window.
    Close the Account Settings and the Mail Setup dialog boxes, then return to the file explorer window.
    Important: be sure to close these two dialog boxes before you delete the file. If they aren't closed, Windows may display an error message about a conflict.
    In the file explorer window, right-click the Exchange data file and then click
    Delete. The next time you start Outlook, a new .ost file is created for the account.
    Best Regards.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Lynn-Li
    TechNet Community Support

  • PowerShell Script to Create a Contact Card and Enable Email Forwarding

    Exchange 2010
    Can anyone help with creating a powershell script to create a contact card and set email forwarding at the sametime?
    I'm looking to import a list of 200 users via a text or csv file, create the contact card with first name, middle initial if one exists, last name, (no alias) and put the contact card in the following OU "DIS###" in the a.b.c.com domain as well
    as enable forwarding to @mail.com.
    I've been able to create a script to enable mail forwarding but it doesn't help me without a contact card.  I hate to put this upon anyone, but my ps scripting and Exchange knowledge is still in it's infant stage and I need get this done post haste

    Q:Import csv: Does this contain 200 mailboxes name
    A:It contains 200 user logon names.
    For the mail forwarding:
    I currently have a csv file with two columns -- one named displayname and the next call mailaddress.  Under the displayname column I have the users account name (first.mi.last -- middle initial if they have one) and under mailaddress i have @mail.com.                                                                                                           
    script:                                                                                                                                                                    
    Import-CSV C:\setmailforwarding\mailforwarding.csv | foreach-Object{Get-Mailbox $_.displayname | set-Mailbox -forwardingAddress $_.mailaddress}
    The above script should work if the contact card has been created.  Obviously I need to create the card first.
    I don't have a script to set up the contact card as of yet -- I was hoping to get some help on that.
    Q:E-mail forwarding: Is this  from  mailboxes to mail contact, you will be creating
    A:Not really sure what you are asking.  I'm looking to create the contact card with a csv or txt file for first name, middle initial if one exists, last name, (no alias) and put the contact card in the following OU "DIS###" in the a.b.c.com domain as
    well as enable forwarding to @mail.com.  The users current email is @mail.1234.com and we will be migrating our mailboxes to another organization that uses @mail.com.  I will need to set forwarding in the interim until the migration is complete.
    Hope this helps.

  • Cleanup after a 2013 forklift migration...leftover non-user mailboxes on old server?

    So, I did a forklift migration from 2013 RTM to 2013 SP1. Everything is great with 1 exception: Arbitration and system mailboxes still think they are on the RTM server, so I can't remove the RTM server from the environment.
    I ran the powershell command to "re-home" all the user mailboxes to the SP1 server's database...it succeeded!
    Because the original information store file isn't mounted on the RTM server, I can't issue a get-mailbox -arbitration | New-Moverequest -Targetdatabase
    "SP1 SERVER'S DATABASE"
    My question:
    Wouldn't a forklift have brought the Arbitration and system mailboxes to the new SP1 server and all I have to do is run a seperate command to rehome them specifically?
    Is there a better way? Can I safely recreate the Arbitration and system mailboxes on the SP1 server?
    -Dane

    Hi Martina, thanks for chiming in!
    Upon running that, I get the list of all mailboxes in that Old Database.
    DisplayName                             ItemCount    StorageLimitStatus       
           LastLogonTime
    SystemMailbox{311ff57d...         193
    HealthMailbox87302716d...         4783                                                      4/18/2014
    7:52:46 PM
    Personal Archive - Hea...             0                                                           4/18/2014
    7:52:46 PM
    Discovery Search Mailbox            3
    Microsoft Exchange                     10
    Microsoft Exchange                     22
    Microsoft Exchange App...            3
    Microsoft Exchange Fed...            3
    Microsoft Exchange Mig...            19
    HealthMailbox311ff57db...           9044                                                 
    5/13/2014 11:02:04 AM
    Personal Archive - Hea...             0                                                            4/24/2014
    7:46:02 AM
    test1                                         70                                                           4/22/2014
    2:32:52 PM
    9102_Scion                                9                                                            4/24/2014
    6:15:27 PM
    admin                                       38                                                           4/23/2014
    2:58:54 PM
    Anna Valle                                14904                                                      4/23/2014
    2:58:55 PM
    That HealthMailbox311ff57db...is the only one with a recent logon, could that be the culprit!?!?
    Everything else shows a logon timestamp of the evening it was forklifted to a new database, which is what I expect to see.
    -Dane

  • Exchange powershell check size mailbox in OU

    Hi Member
    I use exchange 2013 cu1 on sever 2012
    I would like know user mailbox size in OU by PS or Exchange PS .
    How to create code for get mailboxsize ?
    Is script run on exchange server or active directory server ?

    Hi,
    this is the command you should run in Exchange powershell:
    Get-mailbox -OrganizationalUnit "Your OU" | Get-MailboxStatistics| select DisplayName, TotalItemSize, Database, ServerName| export-csv
    \\share\data.csv
    Replase Your OU with OU you wish to get statistics.
    If you want to convert to MB then use this:
    Get-mailbox -OrganizationalUnit "Your OU" | Get-MailboxStatistics|
     select DisplayName, {$_.TotalItemSize.Value.ToMB()}, Database, ServerName| export-csv
    \\share\data.csv
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you. Thank you! Off2work
    It's show error OU name
    [PS] C:\Windows\system32>Get-mailbox -OrganizationalUnit "it" | Get-MailboxStatistics| select DisplayName, TotalItemSize
    , Database, ServerName| export-csv D:\data.csv
    Multiple organizational units match identity "it". Specify a unique value.
    + CategoryInfo : NotSpecified: (:) [], ManagementObjectAmbiguousException
    + FullyQualifiedErrorId : [Server=WSE-EXCHMB01,RequestId=aa9096bf-cb7e-4d68-b7d8-afd636013d4a,TimeStamp=10/7/2014
    5:34:32 AM] 1BEDEDA0
    + PSComputerName : wse-exchmb01.wse.in.th

  • Search a users mailbox for a "missing" email

    Is there a command line or script used to locate an email that a user claims was moved or never came in, yet the server states it was delivered? 
    I am basically looking for a way to search a users mailbox thru command or powershell and have it display the folder/path in Outlook where the message was dragged to accidentally. 
    I tried the Search-Mailbox -Identity "Fred Flintstone" -SearchQuery 'from:[email protected]' but I don't want to delete or export the message, just find the path where its located in Outlook. 
    Thanks in advance. 

    Hi,
    Try this command:
    Search-Mailbox -Identity "Fred Flintstone" -SearchQuery 'from:[email protected]' -TargetMailbox “your mailbox” -TargetFolder “folder name” -logLevel Full
    This command just copy the message from source mailbox as attachment to target mailbox with full log level. Then you can open that attachment to see more details.
    Note: we cannot use the EstimateResultOnly switch with the
    TargetMailbox and Loglevel parameter.
    Best Regards.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Lynn-Li
    TechNet Community Support

  • Export-Mailbox for legal discovery remove empty folders

    Hi Everyone,
    I'm having a bit of an issue with running an export mailbox search for a legal discovery that we need to perform. Basically we need to find any messages sent from two specific addresses to anyone within our company and export them to a mailbox for our legal
    team to review. The problem that i'm running into is that the export-mailbox command copies the folder structure for each mailbox that it searches to the target mailbox. When the legal team attempts to open the mailbox its taking an extremely long
    time for the target mailbox to open. 
    Is there any way to run the export-mailbox command and have it not copy the folder structure for users that have no messages related to the search ? I haven't been able to find anything about a command line option to not create empty folders so i'm assuming
    this isn't a built in feature. If not has anyone had to deal with this issue before, if so what solution did you use to delete the empty folders folders in the target mailbox ? 
    We are running Exchange 2007 SP1

    Hi Ragharam,
    Thank you for the response. Unfortunately the command cannot be limited to just the inbox as i must search deleted items and any folders that the users created as well as the inbox. Pretty much i have to search every where for any existence of
    these messages.  I'm running a command that is similar to what you listed above and the export is working the problem is that we have roughly 5000 user mailboxes that we need to search. Since the export-mailbox command creates a folder for each
    user that has been searched in the target mailbox and that folder contains each users folder structures the resulting mailbox or PST file pretty much just hangs the Outlook client as soon as its opened. 
    My hope is that there would be some way to only create folders for users that have matches to the search filter and not for the users that do not match or some way to delete the empty folders within the mailbox without having to open it. 

  • Converting User Mailboxes to Linked Mailboxes

    We're going to be moving users to a new, trusted domain and want to keep our Exchange 2013 server in the old domain. It looks like the best strategy for us is to convert our user mailboxes to linked mailboxes for users who will log into the new domain.
    There's quite a bit out on the web on doing this in Exchange 2010 but I don't see anything specific to Exchange 2013. Is the procedure basically the same? This is what users seem to be doing from PowerShell:
    Set-User <userID> -LinkedMasterAccount  AccountDomain\UserID  -LinkedDomainController AccountDomainControllerFQDN
    Orange County District Attorney

    Hi,
    If you want to convert the existing mailbox to a linked mailbox, we can do the following steps:
    1.To disconnect the mailbox object in the Exchange store from the user object in Active Directory, for example.
    Disable-Mailbox -Identity User1
    2.To create a credential object, run the following command.
    $cred = Get-Credential
    You will be prompted for credentials. Specify an account that has permissions to access the domain controller in the forest where the user account resides. Use the LinkedDomainController parameter to specify the domain controller. This domain
    controller obtains security information for the account to which you are linking the mailbox object.
    3.To reconnect the mailbox object in the Exchange store to an external user object, use this example.
    Connect-Mailbox -Identity User1 -Database "Mailbox Database" -LinkedDomainController FabrikamDC01 -LinkedMasterAccount [email protected] -LinkedCredential $cred
    For more information about converting linked mailbox, please refer to:
    https://technet.microsoft.com/en-us/library/bb201694%28v=exchg.141%29.aspx?f=255&MSPPError=-2147217396
    Regards,
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Winnie Liang
    TechNet Community Support

  • Primary mailbox (on Exchange 2010) and Personal Archive (on Exchange 2013), possible?

    Current environment is Exchange 2010 SP3 RU5 supporting 4,000 Users. Client estate is Outlook 2010 SP1 going on SP2.
    We're pulling our Archiving solution away from 3rd party and back into Exchange. Implementing a new set of Exchange 2010 Servers (old DAG or in a new Archive DAG) would be easy. But is there Exchange 2013 stepping stone potential?
    Can the Archive DAG / Archive mailboxes be on 2013? i.e. for any given User, leave their primary mailbox on Exchange 2010 and create new Archive mailbox on 2013.
    I want to avoid implementing 2010 Archive Servers and then go 2013 Archive 6 months or a year later.
    This article suggests 'no':
    http://technet.microsoft.com/en-gb/library/dd979800(v=exchg.150).aspx
    "Locating a user’s mailbox and archive on different versions of Exchange Server is not supported."
    I've found little info but the odd statement here / there.
    Is this the latest position? Is it that cut & dry? Anyone tried it? Why won't it work (or will it but it's not supported)?
    Thanks!

    <I had a response from MS>
    Below is a summary of the case for your records:
    Symptom:
    =============
    Is it possible to implement a 2013 environment to host the Archive mailboxes? i.e. for any given User, their primary mailbox is on Exchange 2010 and their Archive
    mailbox is on 2013. 
    Resolution:
    =============
    It’s not supported to have a user’s primary mailbox reside on an older Exchange version than the user’s archive. If the user’s primary mailbox is still on Exchange
    2010, you must move it to Exchange 2013 before or at the same time when you move the archive to Exchange 2013.
    http://technet.microsoft.com/en-us/library/jj651146(v=exchg.150).aspx
    as per the repro in our lab, having the archive mailbox in higher version of exchange would fail with the error above
    <the scenario isn't completely relevant, looks like he's trying to put the Primary on 2013 and not the Archive, no matter, we've established there are problems, question is whether they are looking into this area / to patch, they go on...>
    At this point in time we don’t have a conformation from the product team, if the above would change in the future exchange versions.
    <MS did say on the call that they were not looking at fixing it, naturally this isn't a "never", as per previous statement - they can't commit 100% to the future, but they've provided me the answer - they are not currently looking at resolving/providing
    this as a migration scenario, end.>

  • Bulk SIP-Enable User Mailboxes with Parameters

    Currently, we have 400+ users on the network. Our requirement is to bulk sip enable in Lync 2013 and also add them to the policies (all staff have the same policies)..
    Have a CSV output with Display Name / Alias (Exported all User Mailboxes) and need to SIP enable the accounts with the below policies:
    Assign users to pool 'pr-pool'
    Telephony 'PC-to-PC only'
    Conferencing Policy 'Allow audio and video'
    External Access Policy 'User'
    I am testing my patience with powershell.. Need some help!!

    Take a look at Kenneth Peet's Lync Bulk User Enablement Tool: http://gallery.technet.microsoft.com/office/Lync-Bulk-User-Enablement-b60d1990
     or 
    http://gallery.technet.microsoft.com/office/Script-to-Enable-Users-and-f56306ed
    Please mark posts as answers/helpful if it answers your question.
    Blog
    Lync Validator - Used to assist in the validation and documentation of Lync Server 2013.

Maybe you are looking for