码迷,mamicode.com
首页 > 其他好文 > 详细

Active Directory Recycle Bin

时间:2016-12-16 23:30:13      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:active   directory   bin   recycle   

# 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

标签:active   directory   bin   recycle   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!