Experiencing serialization and deserialization errors while attempting to update the IP ranges of a receive connector in Exchange. The following commands are being used:
$recCon = get-receiveconnector "EX1\relay"
$recCon.remoteIPRanges += "1.1.1.1", "1.1.1.2"
set-receiveconnector $recCon -remoteIPranges $recCon.remoteIPRanges
The error received is:
"Cannot convert value "1.1.1.1" to type "Microsoft.Exchange.Data.IPRange". Error: "Serialization TypeConverter.DeserializeObject(Microsoft.Exchange.Data.IPRange). Type is not allowed for custom construction. Deserialization Failed Error: System.Exception: SerializationData is not signed."
This method worked previously, and all commands are executed within the Exchange Management Shell, not through remote PowerShell. Assistance in resolving this issue would be appreciated.