首页 > 其他 > 详细

Active Directory Recycle Bin

时间:2016-12-16 23:28:54      阅读:248      评论:0      收藏:0      [点我收藏+]

# 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

原文:http://alphabook.blog.51cto.com/232573/1883485

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!