将 AD 组上的 msExchRequireAuthToSendTo 改回 "Not Set"
Changing msExchRequireAuthToSendTo on AD group back to "Not Set"
我们 运行 一个 "hybrid" Exchange 环境,其中 Office365 查看 AD 组的某些属性。 ExtendedAttributes 之一 msExchRequireAuthToSendTo 控制 "outside" 用户是否可以发送到 AD 中保存的通讯组列表。
此 ExtendedAttribute 具有三种可能的设置:True / False / "Not Set" - 为了防止 "outside" 用户发送垃圾邮件,该值必须为 True。默认为 "Not Set".
我可以像这样设置 True 或 False:
$InternalDistro = (Get-ADGroup -filter 'name -eq "CoolDistroList"')
Set-ADGroup $InternalDistro -Replace @{msExchRequireAuthToSendTo = $False}
有没有办法将值 BACK 设置为默认值 "Not Set"?我试过 $Null 但是 returns 一个错误:
Set-ADGroup : Cannot bind parameter 'Replace' to the target. Exception setting "Replace": "Object reference not set to an
instance of an object."
At line:2 char:38
+ ... ADGroup $InternalDistro -Replace @{msExchRequireAuthToSendTo = $Null}
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Set-ADGroup], ParameterBindingException
+ FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.ActiveDirectory.Management.Commands.SetADGroup
如有任何建议,我们将不胜感激 - 感谢您考虑这个问题!
Is there a purpose to setting it back to 'Not Set' rather than
'False'? If so use the -Clear parameter: Set-ADGroup $InternalDistro
-Clear 'msExchRequireAuthToSendTo' – TheMadTechnician
这非常有效,作为答案发布 - 所有功劳都归功于@TheMadTechnician!
我们 运行 一个 "hybrid" Exchange 环境,其中 Office365 查看 AD 组的某些属性。 ExtendedAttributes 之一 msExchRequireAuthToSendTo 控制 "outside" 用户是否可以发送到 AD 中保存的通讯组列表。
此 ExtendedAttribute 具有三种可能的设置:True / False / "Not Set" - 为了防止 "outside" 用户发送垃圾邮件,该值必须为 True。默认为 "Not Set".
我可以像这样设置 True 或 False:
$InternalDistro = (Get-ADGroup -filter 'name -eq "CoolDistroList"')
Set-ADGroup $InternalDistro -Replace @{msExchRequireAuthToSendTo = $False}
有没有办法将值 BACK 设置为默认值 "Not Set"?我试过 $Null 但是 returns 一个错误:
Set-ADGroup : Cannot bind parameter 'Replace' to the target. Exception setting "Replace": "Object reference not set to an
instance of an object."
At line:2 char:38
+ ... ADGroup $InternalDistro -Replace @{msExchRequireAuthToSendTo = $Null}
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Set-ADGroup], ParameterBindingException
+ FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.ActiveDirectory.Management.Commands.SetADGroup
如有任何建议,我们将不胜感激 - 感谢您考虑这个问题!
Is there a purpose to setting it back to 'Not Set' rather than 'False'? If so use the -Clear parameter: Set-ADGroup $InternalDistro -Clear 'msExchRequireAuthToSendTo' – TheMadTechnician
这非常有效,作为答案发布 - 所有功劳都归功于@TheMadTechnician!