IT Support
asked on
365 mailflow connector script suddenly stopped working
365 mailflow connector script suddenly stopped working - it used to work, now it works except for the inbound connector. i havent changed anything...any ideas please?
here is my script
all other lines work fine, and the connectors and rles are added just fine, but it now throws this error and the inbound connector doesnt get added. any ideas please???
ModuleType Name ExportedCommands
---------- ---- ----------------
Script tmp_6cfc6321-5b3d-4007... {Get-DeviceComplianceDetai lsReportFi lter, Get-IRMConfiguration, New-Mail...
A positional parameter cannot be found that accepts argument '-DetectSenderIPRecipientL ist'.
+ CategoryInfo : InvalidArgument: (:) [New-InboundConnector], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFoun d,New-Inbo undConnect or
here is my script
<#
Get-InboundConnector | fl
#>
Set-ExecutionPolicy RemoteSigned -Force
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
New-InboundConnector -Enable $True -Name "HES INBOUND CONNECTOR" -SenderDomains * -restrictdomainstocertificate $false -RequireTls $true -SenderIPAddresses 52.48.127.192/26, 52.58.62.192/26, 52.58.63.0/25 -RestrictDomainsToIPAddresses $false -DetectSenderIPRecipientList $true -connectortype partner -detectsenderipbyskippinglastip $false -cloudservicesmailenabled $false
New-outboundConnector -Enable $True -name "HES OUTBOUND CONNECTOR" -usemxrecord $false -connectortype partner -smarthosts relay.hes.trendmicro.eu -tlssettings certificatevalidation -istransportrulescoped $true -routeallmessagesviaonpremises $false -cloudservicesmailenabled $false -allaccepteddomains $false
new-transportrule -enable $True -name "ONLY ACCEPT INBOUND MAIL FROM HES" -mode enforce -senderaddresslocation Header -fromscope notinorganization -exceptifsenderipranges 52.48.127.192/26, 52.58.62.192/26, 52.58.63.0/25 -deletemessage $true
new-transportrule -enable $True -name "DISABLE 365 SPAM FILTER" -mode enforce -senderaddresslocation Header -setscl -1 -senderipranges 52.48.127.192/26, 52.58.62.192/26, 52.58.63.0/25
new-transportrule -enable $True -name "HES OUTBOUND RULE" -mode enforce -senttoscope notInOrganization -HasNoClassification $False -HasSenderOverride $False -ExceptIfHasNoClassification $False -RouteMessageOutboundConnector "HES OUTBOUND CONNECTOR"
<# need to make sure spf hard check is off in spam filter manually#>
Remove-PSSession $Session
all other lines work fine, and the connectors and rles are added just fine, but it now throws this error and the inbound connector doesnt get added. any ideas please???
ModuleType Name ExportedCommands
---------- ---- ----------------
Script tmp_6cfc6321-5b3d-4007... {Get-DeviceComplianceDetai
A positional parameter cannot be found that accepts argument '-DetectSenderIPRecipientL
+ CategoryInfo : InvalidArgument: (:) [New-InboundConnector], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFoun
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
anyways, thanks for that - i will ditch that parameter and see what happens on the next migration...
thanks again.