User Profile
jt8585
Brass Contributor
Joined 5 years ago
User Widgets
Recent Discussions
Exchange EWS API Error
After migrating from 2016 to 2019 and SE, I was trying to move my script to the new server but came up with many issues. I was using this yesterday and it was working and today it's not. Seems random and no idea why it's happening that Exchange2016 disappears from the selection. $Service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService( [Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2016 ) The property 'Exchange2016' cannot be found on this object. Verify that the property exists. At line:1 char:1 + $Service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeSer ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException + FullyQualifiedErrorId : PropertyNotFoundStrict If I run the following, Exchange2016 is no longer in the list (it was when I tried yesterday). This seems random, [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Set-StrictMode -Version Latest Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn Add-Type -Path 'C:\Setup\ExchangeEWS\Microsoft.Exchange.WebServices.dll' # Get the type information for the ExchangeVersion enumeration $type = [Microsoft.Exchange.WebServices.Data.ExchangeVersion] # Get all declared fields $fields = $type.GetFields('DeclaredOnly, Public, Static') # Iterate over each field and display its name and value foreach ($field in $fields) { Write-Output "$($field.Name) = $($field.GetValue($null))" } Output: Exchange2007_SP1 = Exchange2007_SP1 Exchange2010 = Exchange2010 Exchange2010_SP1 = Exchange2010_SP1 Exchange2010_SP2 = Exchange2010_SP2 Exchange2013 = Exchange2013 Exchange2013_SP1 = Exchange2013_SP1 And if I run in Powershell ISE, I see more error (same script in regular powershell works). Exception calling "FindItems" with "2" argument(s): "The request failed. The underlying connection was closed: An unexpected error occurred on a send." At line:87 char:5 + $Items = $Service.FindItems( 'Inbox', ( New-Object Microsoft.Exch ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : ServiceRequestException71Views0likes0CommentsExchange Online Mailbox Retention
To utilize EXO for SEC Regulation and Purview eDiscovery. I think we need to have some kind of 7 years retention. What is the best way to accomplish this? MRM, Compliance Policy, Preservation lock, some kind hold policy, litigation hold ? So deleted items are not deleted and Primary mailbox will expand to Archive up to 1.5 TB. EX: under Data lifecycle management, create a 7 years retention policy for EXO, and other services. Would this be sufficient? For mailbox reaching 1.5TB with retention in place, how would I move mailbox data to secondary mailbox and allow users to access both. If a leaver mailbox is delete after 30 days, will the retention keep the data for purview searches?184Views0likes3CommentsHybrid Centralized Transport sending emails to EXO
I've discovered that Microsoft hosted tenants emails we receive is going directly to our EXO tenant and using the Hybrid Outbound connector going directly to on-prem Exchange by passing our on-prem Email Gateway fitlers. Also saw some quarantined emails in the EXO from EXO Antimalware scanning. With Hybrid Centralized Transport, I need all mail flow to work just like before the Hybrid configuration based on our MX records. None Microsoft tenants email goes directly to our on-prem Email Gateway for processing before delivered to Exchange on-prem. How do I change this behavior for Microsoft hosted tenants? I do not want email processed by EXO at all. I need all emails go through our on-prem Email Gateway for processing published with our MX records. This is currently bypassing our on-prem anti-virus, anti-spam among other safety features and using EXO's feature.Solved148Views0likes2CommentsExchange 2016 Plug-in
I have multiple plugins such as salesforce/zoom. Couple of times this last few months, when user complain that the plugin disappeared from Outlook I see powershell errors using get-app. Using get-app by it self worked. Using get-app -mailbox username get the following error. It can be fixed by re-running set-app on the mailboxes. Object of type 'SystemByte[]' cannot be converted to type 'System.IO.Stream' CategoryInfo: NotSpecified: (:) [Get-App], ArgumentException FullyQualifiedErrorID: System.ArgumentException,Microsoft,Exchange.Management.Extension.GetApp PSComputerName: server1.domain.local Could these be caused by Exchange Security patching where the commands need to be re-ran every time I patch Exchange 2016?Solved1KViews0likes1CommentRe: 401 Unauthorized
I'm creating 1 session to run some mailbox cleanup via EWS API. exchangeserver1 = actual server name I'm rdp'd into the actual exchange server (tried going to server1 to server1 and server1 to server2). Only this script under this account is behaving this way with compliance rights to delete emails from various mailboxes. Other scripts using other accounts (with less rights) are working as expected.1.7KViews0likes0Comments401 Unauthorized
I'm using the following for powershell to connect to Exchange 2016 and it works most of the time but sometimes i keep on getting 401 unauthorized. I would try running it on the server itself or from one Exchange to another with same results. I wait a day, it'll start to work again. Is this a bad syntax account issue? or is there a better way? $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://exchangeserver1/PowerShell/ -Authentication Kerberos -ErrorAction SilentlyContinue -WarningAction SilentlyContinue Import-PSSession -Session $Session -DisableNameChecking -AllowClobber| out-null1.8KViews0likes2Comments
Recent Blog Articles
No content to show