none
Microsoft Exchange Online Powershell Module, cannot parse -receivedafterdate/receivedbeforedate for new-inboxrule RRS feed

  • Question

  • Please check this out. I am connected to office 365, and trying to create mailbox rules (target mailbox is a shared mailbox)

    shortdatetime format is dd-mm-yyyy , however every variant of (dd-mm-yyyy or mm-dd-yyyy or dd-mm-yyyy hh:mm:ss tt or mm-dd-yyyy hh:mm:ss tt) fails

    PS C:\Users\cl> get-culture
    
    LCID             Name             DisplayName
    ----             ----             -----------
    18441            en-SG            English (Singapore)
    
    
    PS C:\Users\cl> (Get-Culture).DateTimeFormat
    
    
    AMDesignator                     : AM
    Calendar                         : System.Globalization.GregorianCalendar
    DateSeparator                    : -
    FirstDayOfWeek                   : Sunday
    CalendarWeekRule                 : FirstDay
    FullDateTimePattern              : dddd, d MMMM yyyy h:mm:ss tt
    LongDatePattern                  : dddd, d MMMM yyyy
    LongTimePattern                  : h:mm:ss tt
    MonthDayPattern                  : d MMMM
    PMDesignator                     : PM
    RFC1123Pattern                   : ddd, dd MMM yyyy HH':'mm':'ss 'GMT'
    ShortDatePattern                 : dd-MM-yyyy
    ShortTimePattern                 : h:mm tt
    SortableDateTimePattern          : yyyy'-'MM'-'dd'T'HH':'mm':'ss
    TimeSeparator                    : :
    UniversalSortableDateTimePattern : yyyy'-'MM'-'dd HH':'mm':'ss'Z'
    YearMonthPattern                 : MMMM yyyy
    AbbreviatedDayNames              : {Sun, Mon, Tue, Wed...}
    ShortestDayNames                 : {Su, Mo, Tu, We...}
    DayNames                         : {Sunday, Monday, Tuesday, Wednesday...}
    AbbreviatedMonthNames            : {Jan, Feb, Mar, Apr...}
    MonthNames                       : {January, February, March, April...}
    IsReadOnly                       : False
    NativeCalendarName               : Gregorian Calendar
    AbbreviatedMonthGenitiveNames    : {Jan, Feb, Mar, Apr...}
    MonthGenitiveNames               : {January, February, March, April...}
    
    
    
    PS C:\Users\cl> get-date -format d
    05-07-2019
    
    PS C:\Users\cl> New-InboxRule -Mailbox SGTEAM.archive2019 -Name '1 Jan 2019' -ReceivedAfterDate  "12-31-2018" -ReceivedB
    eforeDate "02-01-2019" -MoveToFolder 'SGTEAM.archive2019:\mail2019-01'
    
    
    Error on proxy command 'New-InboxRule -Mailbox:'SGTEAM.archive2019' -Name:'1 Jan 2019' -ReceivedAfterDate:'31/12/2018
    12:00:00 AM' -ReceivedBeforeDate:'1/2/2019 12:00:00 AM' -MoveToFolder:'SGTEAM.archive2019:\mail2019-01'
    -Confirm:$False' to server DM5PR17MB1643.namprd17.prod.outlook.com: Server version 15.20.2032.0000, Proxy method PSWS:
    Cmdlet error with following error message:
    System.Management.Automation.ParentContainsErrorRecordException: Cannot process argument transformation on parameter
    'ReceivedAfterDate'. Cannot convert value "31/12/2018 12:00:00 AM" to type
    "Microsoft.Exchange.ExchangeSystem.ExDateTime". Error: "String was not recognized as a valid DateTime.".
    [Server=PS1PR06MB2759,RequestId=5d450786-330e-4bc5-9cb4-8b1c226d6c13,TimeStamp=5/7/2019 2:47:53 AM] .
        + CategoryInfo          : NotSpecified: (:) [New-InboxRule], CmdletProxyException
        + FullyQualifiedErrorId : Microsoft.Exchange.Configuration.CmdletProxyException,Microsoft.Exchange.Management.Reci
       pientTasks.NewInboxRule
        + PSComputerName        : outlook.office365.com
    
    PS C:\Users\cl> New-InboxRule -Mailbox SGTEAM.archive2019 -Name '1 Jan 2019' -ReceivedAfterDate  "31-12-2018" -ReceivedB
    eforeDate "01-02-2019" -MoveToFolder 'SGTEAM.archive2019:\mail2019-01'
    
    
    Cannot process argument transformation on parameter 'ReceivedAfterDate'. Cannot convert value "31-12-2018" to type
    "Microsoft.Exchange.ExchangeSystem.ExDateTime". Error: "String was not recognized as a valid DateTime."
        + CategoryInfo          : InvalidData: (:) [New-InboxRule], ParameterBindin...mationException
        + FullyQualifiedErrorId : ParameterArgumentTransformationError,New-InboxRule
        + PSComputerName        : outlook.office365.com
    
    PS C:\Users\cl> New-InboxRule -Mailbox SGTEAM.archive2019 -Name '1 Jan 2019' -ReceivedAfterDate  "31-12-2018 11:59:00 PM
    " -ReceivedBeforeDate "01-02-2019 11:59:00 PM" -MoveToFolder 'SGTEAM.archive2019:\mail2019-01'
    
    
    Cannot process argument transformation on parameter 'ReceivedAfterDate'. Cannot convert value "31-12-2018 11:59:00 PM"
    to type "Microsoft.Exchange.ExchangeSystem.ExDateTime". Error: "String was not recognized as a valid DateTime."
        + CategoryInfo          : InvalidData: (:) [New-InboxRule], ParameterBindin...mationException
        + FullyQualifiedErrorId : ParameterArgumentTransformationError,New-InboxRule
        + PSComputerName        : outlook.office365.com
    
    PS C:\Users\cl> New-InboxRule -Mailbox SGTEAM.archive2019 -Name '1 Jan 2019' -ReceivedAfterDate  "12-31-2018 11:59:00 PM
    " -ReceivedBeforeDate "02-01-2019 11:59:00 PM" -MoveToFolder 'SGTEAM.archive2019:\mail2019-01'
    
    
    Error on proxy command 'New-InboxRule -Mailbox:'SGTEAM.archive2019' -Name:'1 Jan 2019' -ReceivedAfterDate:'31/12/2018
    11:59:00 PM' -ReceivedBeforeDate:'1/2/2019 11:59:00 PM' -MoveToFolder:'SGTEAM.archive2019:\mail2019-01'
    -Confirm:$False' to server DM5PR17MB1643.namprd17.prod.outlook.com: Server version 15.20.2032.0000, Proxy method PSWS:
    Cmdlet error with following error message:
    System.Management.Automation.ParentContainsErrorRecordException: Cannot process argument transformation on parameter
    'ReceivedAfterDate'. Cannot convert value "31/12/2018 11:59:00 PM" to type
    "Microsoft.Exchange.ExchangeSystem.ExDateTime". Error: "String was not recognized as a valid DateTime.".
    [Server=PS1PR06MB2759,RequestId=b582dc3b-2f77-4e1e-a770-f9f39d65c525,TimeStamp=5/7/2019 2:48:08 AM] .
        + CategoryInfo          : NotSpecified: (:) [New-InboxRule], CmdletProxyException
        + FullyQualifiedErrorId : Microsoft.Exchange.Configuration.CmdletProxyException,Microsoft.Exchange.Management.Reci
       pientTasks.NewInboxRule
        + PSComputerName        : outlook.office365.com
    

    Friday, July 5, 2019 3:12 AM

All replies

  • I also tried the following. basically it can parse 1/1/2018 but it cannot parse 30/11/2018 and also cannot parse 11/30/2018

    PS C:\Users\cl> New-InboxRule -mailbox sgteam.archive2019 -name ForwardTo   -ReceivedAfterDate "1/1/2018" -ReceivedBefor
    eDate "5/7/2018" -ForwardTo sgteam.nls
    
    Name      Enabled Priority RuleIdentity
    ----      ------- -------- ------------
    ForwardTo True    1        16758750741593587713
    
    
    PS C:\Users\cl> New-InboxRule -mailbox sgteam.archive2019 -name ForwardTo   -ReceivedAfterDate "11-30-2018" -ReceivedBef
    oreDate "5/7/2018" -ForwardTo sgteam.nls
    Error on proxy command 'New-InboxRule -Mailbox:'sgteam.archive2019' -Name:'ForwardTo' -ReceivedAfterDate:'30/11/2018
    12:00:00 AM' -ReceivedBeforeDate:'7/5/2018 12:00:00 AM' -ForwardTo:'sgteam.nls' -Confirm:$False' to server
    DM5PR17MB1643.namprd17.prod.outlook.com: Server version 15.20.2032.0000, Proxy method PSWS:
    Cmdlet error with following error message:
    System.Management.Automation.ParentContainsErrorRecordException: Cannot process argument transformation on parameter
    'ReceivedAfterDate'. Cannot convert value "30/11/2018 12:00:00 AM" to type
    "Microsoft.Exchange.ExchangeSystem.ExDateTime". Error: "String was not recognized as a valid DateTime.".
    [Server=PS1PR06MB2759,RequestId=6df43d51-8096-4c26-9ee0-eedf45747f35,TimeStamp=5/7/2019 3:28:27 AM] .
        + CategoryInfo          : NotSpecified: (:) [New-InboxRule], CmdletProxyException
        + FullyQualifiedErrorId : Microsoft.Exchange.Configuration.CmdletProxyException,Microsoft.Exchange.Management.Reci
       pientTasks.NewInboxRule
        + PSComputerName        : outlook.office365.com
    
    PS C:\Users\cl> New-InboxRule -mailbox sgteam.archive2019 -name ForwardTo   -ReceivedAfterDate "30-11-2018" -ReceivedBef
    oreDate "5/7/2018" -ForwardTo sgteam.nls
    Cannot process argument transformation on parameter 'ReceivedAfterDate'. Cannot convert value "30-11-2018" to type
    "Microsoft.Exchange.ExchangeSystem.ExDateTime". Error: "String was not recognized as a valid DateTime."
        + CategoryInfo          : InvalidData: (:) [New-InboxRule], ParameterBindin...mationException
        + FullyQualifiedErrorId : ParameterArgumentTransformationError,New-InboxRule
        + PSComputerName        : outlook.office365.com

    PS C:\Users\cl> New-InboxRule -Mailbox SGTEAM.archive2019 -Name '1 Jan 2019' -ReceivedAfterDate  "31-Dec-18" -ReceivedBe
    foreDate "2019-01-02" -MoveToFolder 'SGTEAM.archive2019:\mail2019-01'
    Error on proxy command 'New-InboxRule -Mailbox:'SGTEAM.archive2019' -Name:'1 Jan 2019' -ReceivedAfterDate:'31/12/2018
    12:00:00 AM' -ReceivedBeforeDate:'2/1/2019 12:00:00 AM' -MoveToFolder:'SGTEAM.archive2019:\mail2019-01'
    -Confirm:$False' to server DM5PR17MB1643.namprd17.prod.outlook.com: Server version 15.20.2032.0000, Proxy method PSWS:
    Cmdlet error with following error message:
    System.Management.Automation.ParentContainsErrorRecordException: Cannot process argument transformation on parameter
    'ReceivedAfterDate'. Cannot convert value "31/12/2018 12:00:00 AM" to type
    "Microsoft.Exchange.ExchangeSystem.ExDateTime". Error: "String was not recognized as a valid DateTime.".
    [Server=PS1PR06MB2759,RequestId=c2bafe58-22a1-4b32-8065-04bf033dd4fc,TimeStamp=5/7/2019 3:40:32 AM] .
        + CategoryInfo          : NotSpecified: (:) [New-InboxRule], CmdletProxyException
        + FullyQualifiedErrorId : Microsoft.Exchange.Configuration.CmdletProxyException,Microsoft.Exchange.Management.Reci
       pientTasks.NewInboxRule
        + PSComputerName        : outlook.office365.com
    
    



    • Edited by chrisloup Friday, July 5, 2019 3:41 AM more examples
    Friday, July 5, 2019 3:32 AM
  • That's the reason I use clear notations, such as:

    New-InboxRule -mailbox sgteam.archive2019 -name ForwardTo   -ReceivedAfterDate "01 Jan 2018" -ReceivedBeforeDate "01 Jan 2019" -ForwardTo sgteam.nls

    Btw, you do know that such a rule will not work, as it only runs on newly received messages, right?

    Friday, July 5, 2019 6:39 AM
  • Hi Chrisloup,

    Please use the short date format that's defined in the Regional Options settings on the computer where you're running the command. like below:

    For example, if the computer is configured to use the short date format mm/dd/yyyy, enter 09/01/2018 to specify September 1, 2018. You can enter the date only, or you can enter the date and time of day. If you enter the date and time of day, enclose the value in quotation marks ("), for example, "09/01/2018 5:00 PM".


    Best Regards,
    Niko Cheng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Monday, July 8, 2019 5:58 AM
    Moderator
  • the shortdate on my pc is dd-mm-yyyy

    as can be seen in the get-culture

    ShortDatePattern                 : dd-MM-yyyy

    I tried both 30-11-2018 and 11-30-2018 . both of which fails 

    PS C:\Users\cl> New-InboxRule -mailbox sgteam.archive2019 -name ForwardTo   -ReceivedAfterDate "1/1/2018" -ReceivedBefor
    eDate "5/7/2018" -ForwardTo sgteam.nls
    
    Name      Enabled Priority RuleIdentity
    ----      ------- -------- ------------
    ForwardTo True    1        16758750741593587713
    
    
    PS C:\Users\cl> New-InboxRule -mailbox sgteam.archive2019 -name ForwardTo   -ReceivedAfterDate "11-30-2018" -ReceivedBef
    oreDate "5/7/2018" -ForwardTo sgteam.nls
    Error on proxy command 'New-InboxRule -Mailbox:'sgteam.archive2019' -Name:'ForwardTo' -ReceivedAfterDate:'30/11/2018
    12:00:00 AM' -ReceivedBeforeDate:'7/5/2018 12:00:00 AM' -ForwardTo:'sgteam.nls' -Confirm:$False' to server
    DM5PR17MB1643.namprd17.prod.outlook.com: Server version 15.20.2032.0000, Proxy method PSWS:
    Cmdlet error with following error message:
    System.Management.Automation.ParentContainsErrorRecordException: Cannot process argument transformation on parameter
    'ReceivedAfterDate'. Cannot convert value "30/11/2018 12:00:00 AM" to type
    "Microsoft.Exchange.ExchangeSystem.ExDateTime". Error: "String was not recognized as a valid DateTime.".
    [Server=PS1PR06MB2759,RequestId=6df43d51-8096-4c26-9ee0-eedf45747f35,TimeStamp=5/7/2019 3:28:27 AM] .
        + CategoryInfo          : NotSpecified: (:) [New-InboxRule], CmdletProxyException
        + FullyQualifiedErrorId : Microsoft.Exchange.Configuration.CmdletProxyException,Microsoft.Exchange.Management.Reci
       pientTasks.NewInboxRule
        + PSComputerName        : outlook.office365.com
    
    PS C:\Users\cl> New-InboxRule -mailbox sgteam.archive2019 -name ForwardTo   -ReceivedAfterDate "30-11-2018" -ReceivedBef
    oreDate "5/7/2018" -ForwardTo sgteam.nls
    Cannot process argument transformation on parameter 'ReceivedAfterDate'. Cannot convert value "30-11-2018" to type
    "Microsoft.Exchange.ExchangeSystem.ExDateTime". Error: "String was not recognized as a valid DateTime."
        + CategoryInfo          : InvalidData: (:) [New-InboxRule], ParameterBindin...mationException
        + FullyQualifiedErrorId : ParameterArgumentTransformationError,New-InboxRule
        + PSComputerName        : outlook.office365.com




    • Edited by chrisloup Wednesday, July 10, 2019 4:22 PM
    Wednesday, July 10, 2019 4:20 PM
  • yes. but i should be able to see the rule in outlook desktop app and choose to manually run it thus decluttering the inbox. and moving the content of the inbox group by month.

    unless you are saying i cannot create date rules for times in the past. (does not explain why 1/1/2018 works)

    Wednesday, July 10, 2019 4:21 PM
  • Hi chrisloup,

    You can create an inbox rule in outlook, and run the "get-inboxrule" to check the date format:

    Get-inboxrule -Mailbox username |fl name,receivedafterdate,receivedbeforedate

    Then, using the date format got form the above command to create a rule by using "new-inboxrule" command again.

    Moreover, i also found a blog may give your some hints:

    PowerShell [DateTime] throws the error “String was not recognized as a valid DateTime.”


    Best Regards,
    Niko Cheng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, July 12, 2019 8:34 AM
    Moderator

  • PS C:\Users\cl> Get-inboxrule -Mailbox sgteam.archive2019 |fl name,receivedafterdate,receivedbeforedate
    Creating a new Remote PowerShell session using MFA for implicit remoting of "Get-InboxRule" command ...


    Name               : test
    ReceivedAfterDate  : 11/29/2019 16:00:00
    ReceivedBeforeDate : 12/31/2019 16:00:00

    *note its in mm/dd/yyyy format. but my shortdateformat is dd-mm-yyyy

    New-InboxRule -Mailbox SGTEAM.archive2019 -Name "test2" -ReceivedAfterDate  "11/29/2019 16:00:00" -ReceivedBeforeDate  "12/31/2019 16:00:00" -MoveToFolder "SGTEAM.archive2019:\mailbox2019-12"



    PS C:\Users\cl> (get-culture).datetimeformat


    AMDesignator                     : AM
    Calendar                         : System.Globalization.GregorianCalendar
    DateSeparator                    : -
    FirstDayOfWeek                   : Sunday
    CalendarWeekRule                 : FirstDay
    FullDateTimePattern              : dddd, d MMMM yyyy h:mm:ss tt
    LongDatePattern                  : dddd, d MMMM yyyy
    LongTimePattern                  : h:mm:ss tt
    MonthDayPattern                  : d MMMM
    PMDesignator                     : PM
    RFC1123Pattern                   : ddd, dd MMM yyyy HH':'mm':'ss 'GMT'
    ShortDatePattern                 : dd-MM-yyyy
    ShortTimePattern                 : h:mm tt
    SortableDateTimePattern          : yyyy'-'MM'-'dd'T'HH':'mm':'ss
    TimeSeparator                    : :
    UniversalSortableDateTimePattern : yyyy'-'MM'-'dd HH':'mm':'ss'Z'
    YearMonthPattern                 : MMMM yyyy
    AbbreviatedDayNames              : {Sun, Mon, Tue, Wed...}
    ShortestDayNames                 : {Su, Mo, Tu, We...}
    DayNames                         : {Sunday, Monday, Tuesday, Wednesday...}
    AbbreviatedMonthNames            : {Jan, Feb, Mar, Apr...}
    MonthNames                       : {January, February, March, April...}
    IsReadOnly                       : False
    NativeCalendarName               : Gregorian Calendar
    AbbreviatedMonthGenitiveNames    : {Jan, Feb, Mar, Apr...}
    MonthGenitiveNames               : {January, February, March, April...}



    PS C:\Users\cl> New-InboxRule -Mailbox SGTEAM.archive2019 -Name "test2" -ReceivedAfterDate  "11/29/2019 16:00:00" -Recei
    vedBeforeDate  "12/31/2019 16:00:00" -MoveToFolder "SGTEAM.archive2019:\mailbox2019-12"
    Error on proxy command 'New-InboxRule -Mailbox:'SGTEAM.archive2019' -Name:'test2' -ReceivedAfterDate:'29/11/2019
    4:00:00 PM' -ReceivedBeforeDate:'31/12/2019 4:00:00 PM' -MoveToFolder:'SGTEAM.archive2019:\mailbox2019-12'
    -Confirm:$False' to server CY4PR17MB1639.namprd17.prod.outlook.com: Server version 15.20.2073.0000, Proxy method PSWS:
    Cmdlet error with following error message:
    System.Management.Automation.ParentContainsErrorRecordException: Cannot process argument transformation on parameter
    'ReceivedAfterDate'. Cannot convert value "29/11/2019 4:00:00 PM" to type
    "Microsoft.Exchange.ExchangeSystem.ExDateTime". Error: "String was not recognized as a valid DateTime.".
    [Server=PS1PR06MB2759,RequestId=bf201ebb-1e9d-4482-ad75-693d46e432f6,TimeStamp=12/7/2019 9:29:01 AM] .
        + CategoryInfo          : NotSpecified: (:) [New-InboxRule], CmdletProxyException
        + FullyQualifiedErrorId : Microsoft.Exchange.Configuration.CmdletProxyException,Microsoft.Exchange.Management.Reci
       pientTasks.NewInboxRule
        + PSComputerName        : outlook.office365.com

    I've also tried and got the same results after changing my pc to mm-dd-yyyy then starting a new microsoft exchange powershell online instance.

    (please note this issue is with microsoft exchange online powershell. there is not an issue with my exchange 2016 on premise powershell which works flawlessly)
    • Edited by chrisloup Friday, July 12, 2019 10:03 AM
    Friday, July 12, 2019 9:32 AM
  • Hi Chris,

    As a workaround, you can use the method provided by Vasil, i have tired in my PC, it works as expected:



    Best Regards,
    Niko Cheng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Tuesday, July 16, 2019 9:53 AM
    Moderator
  • ok. i did some more testing.

    I guess i didn't think it was important at the time., but sgteam.archive2019 are shared mailboxes

    created via

    New-Mailbox -Shared -Name "SGTEAM.archive2019" -DisplayName "SGTEAM.archive2019" -Alias SGTEAM.archive2019 -PrimarySmtpAddress SGTEAM.archive2019@sg.yourdomain.com
    Start-Sleep -s 5
    Set-Mailbox -Identity "SGTEAM.archive2019" -GrantSendOnBehalfTo chris.low@sg.yourdomain.com
    Start-Sleep -s 5
    Add-MailboxPermission -Identity "SGTEAM.archive2019" -User chris.low@sg.yourdomain.com -AccessRights FullAccess -InheritanceType All –AutoMapping $True 




    ---
    Connect-EXOPSSession -UserPrincipalName chris.low@sg.yourdomain.com 

    New-Inboxrule -Name "test 9" -Mailbox SGTEAM.ARCHIVE2019 -MoveToFolder "SGTEAM.ARCHIVE2019:\MAILBOX2019-01" -ReceivedAfterDate "12-13-2018" -ReceivedBeforeDate "12-31-2018"
    New-Inboxrule -Name "test 10" -Mailbox SGTEAM.ARCHIVE2019 -MoveToFolder "SGTEAM.ARCHIVE2019:\MAILBOX2019-01" -ReceivedAfterDate "12-13-2018" 
    New-Inboxrule -Name "test 11" -Mailbox SGTEAM.ARCHIVE2019 -MoveToFolder "SGTEAM.ARCHIVE2019:\MAILBOX2019-01" -ReceivedBeforeDate "12-31-2018"

    New-Inboxrule -Name "test 12" -Mailbox chris.low@sg.yourdomain.com -MoveToFolder "chris.low@sg.yourdomain.com:\deleted items" -ReceivedAfterDate "12-13-2018" -ReceivedBeforeDate "12-31-2018"
    New-Inboxrule -Name "test 13" -Mailbox chris.low@sg.yourdomain.com -MoveToFolder "chris.low@sg.yourdomain.com:\deleted items" -ReceivedAfterDate "12-13-2018" 
    New-Inboxrule -Name "test 14" -Mailbox chris.low@sg.yourdomain.com -MoveToFolder "chris.low@sg.yourdomain.com:\deleted items" -ReceivedBeforeDate "12-31-2018"

    test 9,10,11 fails

    test 12,13,14 succeeds.

    I thought forcing mailboxregionalconfiguration to sync might work. but it doesn't 

    PS C:\Users\cl> get-mailboxregionalconfiguration -identity "chris.low@sg.yourdomain.com"

    Identity             Language        DateFormat TimeFormat TimeZone
    --------             --------        ---------- ---------- --------
    Low, Chris           en-US           M/d/yyyy   h:mm tt    Singapore Standard Time


    PS C:\Users\cl> get-mailboxregionalconfiguration -identity "sgteam.archive2019"

    Identity             Language        DateFormat TimeFormat TimeZone
    --------             --------        ---------- ---------- --------
    SGTEAM.archive2019   en-SG           d MMM yyyy h:mm tt    Singapore Standard Time


    PS C:\Users\cl> Set-MailboxRegionalConfiguration -Identity "chris.low@sg.yourdomain.com" -DateFormat "d MMM yyyy"
    PS C:\Users\cl> Get-MailboxRegionalConfiguration -Identity "SGTEAM.ARCHIVE2019"

    Identity             Language        DateFormat TimeFormat TimeZone
    --------             --------        ---------- ---------- --------
    SGTEAM.archive2019   en-SG           d MMM yyyy h:mm tt    Singapore Standard Time


    PS C:\Users\cl>
    PS C:\Users\cl> Get-MailboxRegionalConfiguration -Identity "chris.low@sg.yourdomain.com"

    Identity             Language        DateFormat TimeFormat TimeZone
    --------             --------        ---------- ---------- --------
    Low, Chris           en-SG           d MMM yyyy h:mm tt    Singapore Standard Time
    Wednesday, July 17, 2019 4:25 AM
  • seems to be a shared mailbox thing

    test 15 succeeds. test 16 fails

    New-Inboxrule -Name "test 15" -Mailbox SGTEAM.ARCHIVE2019 -MoveToFolder "SGTEAM.ARCHIVE2019:\MAILBOX2019-01" -ReceivedBeforeDate "31 Dec 2018"

    New-Inboxrule -Name "test 16" -Mailbox chris.low@sg.sedgwick.com -MoveToFolder "chris.low@sg.sedgwick.com:\deleted items" -ReceivedBeforeDate "31 Dec 2018"

    Wednesday, July 17, 2019 4:28 AM