首页 > 代码库 > Active Directory Recycle Bin
Active Directory Recycle Bin
# Enable Active Directory Recycle Bin
Enable-ADOptionalFeature –Identity ‘CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=vccware,DC=com’ –Scope ForestOrConfigurationSet –Target ‘vccware.com’
# Restore a single deleted user account
Get-ADObject -Filter {SamAccountName -eq "AlphaBet"} -IncludeDeletedObjects
Get-ADObject -Filter {SamAccountName -eq "AlphaBet"} -IncludeDeletedObjects | Restore-ADObject
# Check the deleted user accounts
Get-ADObject -IncludeDeletedObjects -Filter {IsDeleted -eq $True} -Properties * | Format-table Deleted,DisplayName,SamAccountName,UserPrincipalName
# Windows 2012R2 tombstone lifetime of the domain is 180 days by default
本文出自 “AlphaBook” 博客,请务必保留此出处http://alphabook.blog.51cto.com/232573/1883485
Active Directory Recycle Bin
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。