[英]How to run the PowerShell cmdlet “Disable-ADSyncExportDeletionThreshold”?
I want to delete Office 365 users from Active Directory PowerShell in Windows Server 2008 (x64) 我想从Windows Server 2008(x64)中的Active Directory PowerShell中删除Office 365用户
There is a treshold so you can't delete more than 500 users. 有一个阈值,因此您不能删除500个以上的用户。
Microsoft has a documentation to prevent accidetal deletes and it says "just run Disable-ADSyncExportDeletionThreshold" command and it's OK. Microsoft具有防止意外删除的文档,并且说“只需运行Disable-ADSyncExportDeletionThreshold”命令就可以了。
But I have a problem. 但是我有一个问题。 When I try to disable treshold, PowerShell says:
当我尝试禁用阈值时,PowerShell说:
The term 'Disable-ADSyncExportDeletionThreshold' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try aga
in.
At line:1 char:38
+ Disable-ADSyncExportDeletionThreshold <<<<
+ CategoryInfo : ObjectNotFound: (Disable-ADSyncExportDeletionThreshold:String) [], CommandNotFoundExcept
ion
+ FullyQualifiedErrorId : CommandNotFoundException
Also I tried to import "ADSync" but module couldn't loaded. 我也尝试导入“ ADSync”,但模块无法加载。
Any solution? 有什么办法吗?
Thanks. 谢谢。
Disable-ADSyncExportDeletionThreshold
is a commandlet for AAD Connect, you have to have AADConnect module installed and imported for it to work. Disable-ADSyncExportDeletionThreshold
是AAD Connect的命令行开关,您必须安装并导入AADConnect模块才能正常工作。 Try Import-Module “C:\\Program Files\\Microsoft Azure AD Sync\\Bin\\ADSync\\ADSync.psd1”
if its not there, install it. 如果不存在,请尝试
Import-Module “C:\\Program Files\\Microsoft Azure AD Sync\\Bin\\ADSync\\ADSync.psd1”
。
Above answer is great. 以上答案很好。
I would suggest that you disable it temporarily and enable it afterwards as it's enabled by default to prevent lots of deletions to be exported to Azure AD. 我建议您暂时禁用它,然后再启用它,因为默认情况下已启用它,以防止将大量删除导出到Azure AD。 This helps to prevent from deleting accidentally.
这有助于防止意外删除。
Import module first: 首先导入模块:
If all the deletes are desired, then do the following: 如果需要所有删除,请执行以下操作:
Disable-ADSyncExportDeletionThreshold
禁用ADSyncExportDeletionThreshold
. 。 2. Provide an Azure AD Global Administrator account and password.
2.提供一个Azure AD Global管理员帐户和密码。
3. With the Azure Active Directory Connector still selected, select the action Run and select Export.
3.在仍然选择Azure Active Directory连接器的情况下,选择操作“运行”,然后选择“导出”。
4. To re-enable the protection, run the PowerShell cmdlet:
4.要重新启用保护,请运行PowerShell cmdlet:
Enable-ADSyncExportDeletionThreshold
Enable-ADSyncExportDeletionThreshold
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.