I've successfully created a new anti-malware policy via Powershell but I can't make it set to default
I've tried
Set-MalwareFilterPolicy -identity "Custom Policy" -makedefault
Set-MalwareFilterPolicy -identity "Custom Policy" -makedefault:$true
Set-MalwareFilterPolicy -identity "Custom Policy" -makedefault $true
all three generate a Dr Watson and the following error:
"WARNING: An unexpected error has occurred and a Watson dump is being generated: Unable to cast object of type
'Microsoft.Exchange.Data.Directory.SystemConfiguration.ADTopologyConfigurationSession' to type
'Microsoft.Exchange.Data.Directory.SystemConfiguration.ITenantConfigurationSession'.
Specified cast is not valid.
+ CategoryInfo : NotSpecified: (:) [Set-MalwareFilterPolicy], InvalidCastException
+ FullyQualifiedErrorId : System.InvalidCastException,Microsoft.Exchange.Management.SystemConfigurationTasks.SetMa
lwareFilterPolicy
+ PSComputerName : blah.blah.com"
How the XXXX do I set this as the default in Powershell. Yes I can do it in the GUI but I need the powershell command
TIA
Tony