Powershell for setting all user set-mailbox -maxreceivesize

hi,
i can't get my exchange powershell script to change 'set-mailbox * -maxrecievesize 40Mb', please help.
thanks.

In Exchange (2010) there are four different places where you can set delivery size restrictions.
1. On the complete Exchange Organisation.
Console: Global Settings -> Transport Settings
Shell:
Get-TransportConfig %organizationname% | Set-Transportconfig %organizationname% -MaxReceiveSize 50 MB
Get-TransportConfig %organizationname% | Set-Transportconfig %organizationname% -MaxSendSize 50 MB
(you can find your organisationname with this command: Get-OrganizationConfig | ft name)
2a. On a specific Receive Connector.
Console: Server Configuration -> Hub Transport -> Receive Connectors
Shell: Get-ReceiveConnector %connectorname% | Set-ReceiveConnector %connectorname% -MaxMessageSize 25 MB
2b. On a specific Send Connector.
Console: Organization Configuration -> Hub Transport -> Send Connectors -> $connectorname% -> General 
Shell: Get-SendConnector %connectorname% | Set-SendConnector %connectorname% -MaxMessageSize 25 MB
3. On a specific User.
Console: Open User Mailbox -> Mail Flow Settings -> Message Size Restrictions
Shell: Get-Mailbox %emailaddress% | Set-Mailbox %emailaddress% -MaxReceiveSize 10 MB

Similar Messages

  • PowerShell cmdlet Set-Mailbox parameters not working

    Great suggestion, will do. Thanks Matthew.

    Essentially I'm just trying to set Shared Mailbox default behaviour for when a user sends an email from that mailbox the sent email is placedin the Shared Mailbox sent folder instead of the users sent folder which is what it does now. This is supposed to be possible with Powershell according to MS. We're using Office 365 Enterprise for this. The error is the following:PS C:\ Get-Mailbox TestSharedMailbox | select *message*MessageCopyForSentAsEnabled : FalseMessageCopyForSendOnBehalfEnabled : FalseMessageTrackingReadStatusEnabled : TrueDowngradeHighPriorityMessagesEnabled : FalsePS C:\ Set-Mailbox TestSharedMailbox -MessageCopyForSentAsEnabled $TrueA parameter cannot be found that matches parameter name 'MessageCopyForSentAsEnabled'. + CategoryInfo : InvalidArgument: (:) [Set-Mailbox], ParameterBindingException + FullyQualifiedErrorId :...
    This topic first appeared in the Spiceworks Community

  • Using Powershell to delete all users from the Portal

    Summary
    This script will delete all users from the Portal except for Administrator and the Built-In Sync account.
    Based on Markus's "Delete a User" script.
    Useful when developing your system if you want to quickly clear out the data and start again.
    set-variable -name URI -value "http://localhost:5725/resourcemanagementservice' " -option constant
    function DeleteObject
    PARAM($objectType, $objectId)
    END
    $importObject = New-Object Microsoft.ResourceManagement.Automation.ObjectModel.ImportObject
    $importObject.ObjectType = $objectType
    $importObject.TargetObjectIdentifier = $objectId
    $importObject.SourceObjectIdentifier = $objectId
    $importObject.State = 2
    $importObject | Import-FIMConfig -uri $URI
    if(@(get-pssnapin | where-object {$_.Name -eq "FIMAutomation"} ).count -eq 0) {add-pssnapin FIMAutomation}
    $allobjects = export-fimconfig -uri $URI `
    –onlyBaseResources `
    -customconfig "/Person"
    $allobjects | Foreach-Object {
    $displayName = $_.ResourceManagementObject.ResourceManagementAttributes | `
    Where-Object {$_.AttributeName -eq "DisplayName"}
    if([string]::Compare($displayName.Value, "Administrator", $True) -eq 0)
    {write-host "Administrator NOT deleted"}
    elseif([string]::Compare($displayName.Value, "Built-in Synchronization Account", $True) -eq 0)
    {write-host "Built-in Synchronization Account NOT deleted"}
    else {
    $objectId = (($_.ResourceManagementObject.ObjectIdentifier).split(":"))[2]
    DeleteObject -objectType "Person" `
    -objectId $objectId
    write-host "`nObject deleted`n" $displayName.Value }
    Go to the FIM ScriptBox
    http://www.wapshere.com/missmiis

    The DeleteObject function opens and closes a connection for each object.  This approach is faster:
    http://social.technet.microsoft.com/wiki/contents/articles/23570.how-to-use-powershell-to-delete-fim-users-that-have-a-null-attribute-name.aspx
    Mike Crowley | MVP
    My Blog --
    Planet Technologies

  • Automated Save for web + All user slices + Preset?

    I've got a large PSD templade filled with web slices, each containing web button graphics.
    These are always saved in three states: "-off", "-on" and "-active" in .png format.
    To speed things up, I've prepared:
    * 3 "Layer comps" (that toggles layers on/off and adjusts visibility/effects)
    * 3 "Save for web settings" that appends the "-off", "-on", "-active" suffix etc
    However, each time I want to update these three sets (and that is often!) I have to jump through hoops to get it done... applying layer comp + File > Save for web + selecting "all user slices" and "preset" + confirm overwrite.
    After a few hundred times it gets tiresome :-)
    Bottomline:  Is there any way to make an action, or similar to do all this in a single keystroke?
    Robert K

    I don't know why I didnt't think of this already
    It works a treat, at least with CS4 (haven't tried it elsewhere).
    I ended up doing three actions for each of "off", "on" and "active". The action only toggles the appropriate Layer State, than Save for Web. It seems that only User slices are saved, and no dialogs or anything flashes by.
    Great! Thanks.
    Robert

  • HELP needed on Remote Management set to allow access for all users

    my mac mini snow leopard server runs in a data center and i use screen sharing to interact with it. i played with the sharing settings remotely yesterday and changed "allow access for" to all users. i was disconnected immediately and i couldn't logon again. i have no luck changing to other users. i don't want to make a special trip to the center to change it back to whatever it used to be. i can still use afp to connect but the screen sharing option is no longer available. what does "allow access for all users" mean anyway?
    thanks!

    As its name implies, allow access for all should allow any valid user account to access the server. I'm not sure why it's no longer working. It almost sounds like the ARDAgent crashed.
    Either way there's a command-line interface to the ARD preferences:
    /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/ki ckstart
    man kickstart discusses the options, including examples of how to enable access for specific users.

  • Remove Following people from mysite for all users

    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")
    $web = Get-SPWeb https://www.contoso.com/teams/yourteam
    $context = [Microsoft.SharePoint.SPServiceContext]::GetContext([Microsoft.SharePoint.SPSite]$web.Site)
    $upm = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager $context
    $users = $web.AssociatedMemberGroup.Users | where IsDomainGroup -eq $false
    $useraccounts = $users | select loginname | Foreach {"$($_.loginname)"}
    foreach ($user in $users) {
    $profile = $upm.GetUserProfile($user.UserLogin)
    #$objectToFollowRelativeToWeb = "/"
    if ($profile)
    #Create a Social Manager profile
    #SPSocialFollowingManager
    $followManager = New-Object Microsoft.Office.Server.Social.SPSocialFollowingManager($profile, $context)
    $following = $followManager.GetFollowed([Microsoft.Office.Server.Social.SPSocialActorTypes]::Users)
    for ($i=$following.Count - 1; $i -ge 0; $i--) {
    $followed = $following[$i]
    $acctname = $followed.AccountName
    #if claims:
    $acctname = 'i:0#.w|'+$acctname
    if ($acctname -iin $useraccounts ) {
    [Microsoft.Office.Server.Social.SPSocialFollowResult]$res = $followManager.StopFollowing($followed)
    Write-Verbose "$($user.UserLogin) stop following $acctname result is $res"
    I have the above script from one of the technet solution to remove followeronly  for Contributors from MySite. I want this script to run for all user and remove all existing association. Can someone help me update this script.
    Thanks Ba$va

    Hi Basva,
    According to your description, my understanding is that you want to remove all existing association for all users
    The $users = $web.AssociatedMemberGroup.Users | where IsDomainGroup -eq $false is to get all users in Contributors group. You can change the line to
    $users = $web.AllUsers, then run the script, compare the result.
    Here is an post for getting all users using PowerShell, please take a look at:
    http://www.sharepoint2013.me/Blog/Post/160/Get-all-the-unique-users-in-a-farm-using-PowerShell-script
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • How to change path of Users Terminal Services Profile for multiple AD users on server 2003?

    Hello experts. I am working on a file server migration. All data has been migrated, I am currently working on redirecting users to the new file server. I
    am able to select multiple users at once in ADUC -> right-click -> properties -> profile and here I can change the home folder and roaming profile path for each all users to point towards the new file server. 
    The issue I have run in to is that we have roaming profiles for terminal services users. So, there are hundreds of users that have their terminal services profile
    configured in AD -> Right-click user (one at a time) -> properties -> terminal services profile. Here, the profile path is configured for each user as \\OLDserver\Profiles\%username%
    and I need to change it to \\NEWserver\profiles\%username%. 
    I know that you can configure this path via group policy, I set up a GPO; Computer / Administrative Templates / Windows Components / Terminal Services / “Set Path
    for TS Roaming Profiles” as \\NEWserver\profiles and applied this GPO to an OU containing the TS servers.
    The problem is, the GPO is not working... When I log in to the TS and add a document to My Documents, it is still saving under \\OLDserver\profiles\Username.
    So, the settings in AD are trumping the GPO I believe. What is the best way to accomplish my goal? Thanks in advance!

    > to change it to \\NEWserver\profiles\%username%.
    That is "profile" in opposite to...
    > add a document to My Documents, it is still saving under
    > \\OLDserver\profiles\Username.
    ...this one which is Folder Redirection and has NOTHING to do with
    server based profiles.
    > So, the settings in AD are trumping the GPO I believe.
    No, it isn't. When you do not enable FR and you access "Documents", you
    will never see an UNC path but the local c:\users\xyz\documents folder.
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • Retrieval of all users in Exchange online

    Exchange Version: Exchange Online at Office 365
    API Name: EWS API 2.0
    IDE: Visual basic C# 2010
    Targeted features: Impersonation and retrieval of all users
    Hi there, I am currently developing a program that uses impersonation and queries the EWS API to retrieve emails and their attachments from users. I have used the C# codes from the MSDN Library to develop the program. The program is successful in retrieving
    the emails from specific users that are hard coded into the program.
    The code below shows the process of authenticating the admin user and the impersonation is done in the  RetrieveEmailFromUser() function.
    ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallBack;
    ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);
    service.Credentials = new NetworkCredential("adminemail@", "password", "domain.onmicrosoft.com");
    service.AutodiscoverUrl("adminemail", RedirectionUrlValidationCallback);
    List<string> emailaddrlist = new List<string>();
    emailaddrlist.Add("[email protected]");
    emailaddrlist.Add("[email protected]");
    foreach (string item in emailaddrlist)
    string content = RetrieveEmailFromUser(service, item);
    Console.WriteLine(content);
            static string RetrieveEmailFromUser(ExchangeService service, string emailAddr)
                service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, emailAddr);
                FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Inbox, new ItemView(50));
    As can be seen from the coding, the users that are to be impersonated have been hardcoded. I would like to know if there are any C# codes or a link to a page where it describes how I can retrieve ALL users with mailboxes from a Microsoft 365 admin account
    without needing to manually add users for retrieval.

    Hi there sorry for asking again but I have successfully retrieved all the users but now I would need to filter them to lower the amount of addresses retrieved.
    For example
    owershell.Runspace = runspace;
    //Create the command and add the parameters to retrieve all users that have mailboxes
    powershell.AddCommand("Get-Mailbox");
    powershell.AddParameter("RecipientTypeDetails", "UserMailbox");
    //Invoke the command and store the results in a PSObject collection
    Collection<PSObject> EmailList = powershell.Invoke();
    //Iterate through the results and add the PrimarySMTP address for each mailbox to emailAddrlist
    foreach (PSObject emailAddr in EmailList)
    string time = emailAddr.Properties["WhenCreated"].Value.ToString();
    string addr = emailAddr.Properties["PrimarySmtpAddress"].Value.ToString();
    EmailAddrList.Add(addr + time);
    The property ("WhenChanged") will retrieve the date time when the mailbox had its options MODIFIED but not when an email is received. Is there a parameter I can input using powershell to retrieve users who have new emails in their mailboxes from
    a specific? Or can I change the value of the Property from  ("WhenChanged") to something else that will give me a date time of the most recent addition of an email to the mailbox. This will then allow me to compare the date time to filter out
    addresses which have not received any emails.
    Thank you.

  • Migrating users from Mailbox to cyrus/postfix

    i now have a linux server running courier/qmail/squirrelmail with ~24 users.
    have had trouble locating a howto for migrating all users Mailboxes to OSX server (postfix/cyrus/squirrelmail).
    anyone done this before, have advice?
    thanks,
    -Jeff

    with draging and droping you have a lot to do if you
    have a bunch of imap folders.
    compiling is much difficult as macport and you need
    to install the developper tools. to install macport
    only for imapsync will work fine, after that you can
    savely deinstall it.
    Again, I strongly recommend you do NOT use MacPorts, but of course feel free the mess up your system.
    Among the many issues is that even uninstalling leaves undesired traces.
    Building it is no problem and virtually every server needs DevTools installed anyway.
    just my 2 cents, feel free to do what you deem appropriate.

  • 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.

  • Set-casmailbox command for all users?

    I want to disable the feature in OWA that allows a user to edit their photo.  I got the following command to work but I want to run this for all users and the following command requires me to add a name.  We have 5 different databases. 
    Is this possible?
    Set-CASMailbox John.Doe -OwaMailboxPolicy "Default".
    Ex2013sp1
    PennyM

    At its simplest you could do something like this:
    Get-Mailbox -ResultSize unlimited | Set-CASMailbox -YourOptionGoeshere
    Cheers,
    Rhoderick
    Microsoft Senior Exchange PFE
    Blog:
    http://blogs.technet.com/rmilne 
    Twitter:   LinkedIn:
      Facebook:
      XING:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • How to Set-CasMailbox -ActiveSyncAllowedDeviceIDs (To Allow for all user devices, where I don't know what devices the user has)

    I need to change this for all of our users and have created this script so far.  Does anyone know how to Allow for all devices?  
    $mailboxes = Get-casMailbox -Filter {hasactivesyncdevicepartnership -eq $true -and -not displayname -like "CAS_{*"} | Get-Mailbox 
    foreach ($mailbox in $mailboxes)
        #write-output $mailbox.UserPrincipalName
        $devices = Get-MobileDevice -Mailbox $mailbox.UserPrincipalName
        foreach ($device in $devices){
            #write-output $device.deviceid
              Set-CASMailbox -identity $mailbox.UserPrincipalName -ActiveSyncAllowedDeviceIDs @{Add=$device}
              write-output $mailbox.UserPrincipalName
              write-output $device.deviceid

    For Exchange issues post in Exchange.  You should also just try searching.
    http://social.technet.microsoft.com/Forums/exchange/en-US/1ddc526d-f147-444c-a7bb-39d14415f9bc/clear-activesyncalloweddeviceids
    This was first on list.
    ¯\_(ツ)_/¯

  • CMDLET commands regarding setting a default font for all users using OWA on an exchange 2010 platform

    HI,
    We are running Exchange 2010 and are migrating users from 2003 to 2010 with no problems.  The client has asked me to set OWA font to LuidaSans which I can do for individuals with no problems.  However, when I try and run the following command
    Get-Mailbox -Resultsize Unlimited | Set-MailboxMessageConfiguration -LucidaSans but then got a message to state
    "property composefontname can't be set on this object becuase it requires the object to have version 0.1 <8.0.535.0> or later.  The object's currant version is 0.0 <6.5.6500.0>"
    What object is this reffered to?  Can anyone help please?
    Thanks
    Paul

    Hi,
    To set a default font for all users, you can use this command: -
    Get-Mailbox | Set-MailboxMessageConfiguration -DefaultFontName "Trebuchet"
    You can use any font style in place of “Trebuchet”.
    I hope this information will be helpful for you.
    Thanks and regards
    Ashish@S 
    Ashish@V

  • How can we set Admin rights to access all user mailboxes in IMAP server exchange 2010?

    Hi,
    IMAP is in exchange 2010..
    as per guide:
    http://technet.microsoft.com/en-us/library/jj200730%28v=exchg.150%29.aspx
    CSV Files for IMAP Migration Batches`
    Use super-user or administrator credentials.   This requires that you use an account in your IMAP messaging system that has the necessary rights to access all user mailboxes.
    In the CSV file, you use the credentials for this account for each row. To learn whether your IMAP server supports this approach and how to enable it, see the documentation for your IMAP server.
    How can we set Admin rights to access all user mailboxes in IMAP server exchange 2010?
    thanks?

    Hi,
    Do you mean assigning a user full access permission to all other mailboxes? If so, we can try the following command:
    Get-Mailbox -Server “Exchange 2010” | Add-MailboxPermission -User AdminUserName -AccessRights FullAccess
    Thanks,
    Winnie Liang
    TechNet Community Support

  • How do I set Firefox to be usable for all users on one computer?

    How do I set Firefox to be usable for all users on one computer?

    I would think the about:config entries discussed are ex-factory set to values each user has to change individually, after the installation has run its course. The solution could be to have patched files ready to install post factum:
    [https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences A Brief Guide to Mozilla Preferences - MDN]

Maybe you are looking for