Viewing the Created and Last Modified Time Stamp of an Object
This topic explains how to use the Active Directory module for Windows PowerShell to view the Created and Last Modified time stamp of an object in Active Directory Domain Services (AD DS).
Example
The following example demonstrates how to view the Created and Last Modified time stamp of the organizational unit (OU) ManagedGroups in the Fabrikam.com domain:
Get-ADObject ManagedGroups -Properties Created,Modified
Get-ADObject ManagedGroups -Properties Created,Modified
Additional information
For a full explanation of the parameters that you can pass to Get-ADObject, at the Active Directory module command prompt, type Get-Help Get-ADObject –detailed, and then press ENTER.
Searching for Deleted Objects
This topic explains how to use the Active Directory module for Windows PowerShell to search for deleted objects in Active Directory Domain Services (AD DS).
Example
The following example demonstrates how to search for the deleted organizational unit (OU) Finance Department in the Fabrikam.com domain:
Get-ADObject -ldapFilter:"(msDS-LastKnownRDN=Finance_Department)" –IncludeDeletedObjects
Get-ADObject -ldapFilter:"(msDS-LastKnownRDN=Finance_Department)" –IncludeDeletedObjects
Additional information
For a full explanation of the parameters that you can pass to Get-ADObject, at the Active Directory module command prompt, type Get-Help Get-ADObject –detailed , and then press ENTER.
Restoring a Single Object
This topic explains how to use the Active Directory module for Windows PowerShell to restore a single object in Active Directory Domain Services (AD DS).
Example
The following example demonstrates how to restore the deleted organizational unit (OU) Accounting_Department in the Fabrikam.com domain:
Get-ADObject -ldapFilter:"(msDS-LastKnownRDN=Accounting_Department)" –IncludeDeletedObjects | Restore-ADObject
Get-ADObject -ldapFilter:"(msDS-LastKnownRDN=Accounting_Department)" –IncludeDeletedObjects | Restore-ADObject
Additional information
For a full explanation of the parameters that you can pass to Get-ADObject or Restore-ADObject, at the Active Directory module command prompt, type Get-Help Get-ADObject –detailed or Get-Help Restore-ADObject –detailed, and then press ENTER.
No comments:
Post a Comment