Quantcast
Channel: Powershell – Jacques Dalbera's IT world
Viewing all articles
Browse latest Browse all 85

How to display changes (change history) on Quest ARS in Powershell?

$
0
0

Quest Software\ActiveRoles Server\v6.9\Solutions\Free Tools\Management Shell for Active Directory\

Copy the ArPowershell.chm on your desktop and open it,

Get-QARSLastOperation cmdlet:

Get-QARSLastOperation [-Connection <ArsConnection>] [-ConnectionAccount <string>] [-ConnectionPassword <SecureString>] [-Credential <PSCredential>] [-Proxy] [-Service <string>] [-UseGlobalCatalog] [<CommonParameters>]
Example:
C:\PS>Connect-QADService -Proxy
C:\PS>New-QADUser -ParentContainer ‘labdomain.local/Users’ -Name ‘dummy’
C:\PS>Get-QARSLastOperation

Get-QARSOperation cmdlet:

Get-QARSOperation [-TargetObject <IdentityParameter[]>] [-AttributesChanges <hashtable>] [-ChangedAttributes <string[]>] [-CompletedAfter <DateTimeParameter>] [-CompletedBefore <DateTimeParameter>] [-CompletedOn <DayParameter>] [-CompletedRecently <RelativeDateTimeParameter>] [-Connection <ArsConnection>] [-ConnectionAccount <string>] [-ConnectionPassword <SecureString>] [-Credential <PSCredential>] [-InitiatedAfter <DateTimeParameter>] [-InitiatedBefore <DateTimeParameter>] [-InitiatedBy <IdentityParameter[]>] [-InitiatedByMe] [-InitiatedOn <DayParameter>] [-InitiatedRecently <RelativeDateTimeParameter>] [-OperationID <string[]>] [-OperationStatus <OperationStatus[]>] [-OperationType <OperationType[]>] [-ParentContainer <IdentityParameter[]>] [-Proxy] [-Service <string>] [-SizeLimit <int>] [-TargetObjectType <string[]>] [-UseGlobalCatalog] [<CommonParameters>]

 

Examples

Example 1

C:\PS>Get-QARSOperation -CompletedOn ‘Today’ -ParentContainer ‘test.domain.com/container’ -TargetObjectType ‘user’ -OperationType ‘Modify’ | %{$_.TargetObjectInfo.DN} | Group-Object | %{$_.Name}

List the user accounts from a particular container that were changed on the current date.

Example 2

C:\PS>Get-QARSOperation -CompletedOn (get-date -year 2008 -month 9 -day 1) -ParentContainer ‘test.domain.com/container’ -TargetObjectType ‘Group’ -OperationType ‘Create’ | %{$_.TargetObjectInfo.DN} | Group-Object | %{$_.Name}

List the groups that were created in a particular container on September 1, 2008.

Example 3

C:\PS>Get-QARSOperation -CompletedRecently ([TimeSpan]::FromDays(30)) -TargetObject ‘domainName\groupName’ -OperationType ‘GroupMembershipChange’ | %{$_.InitiatorInfo.NTAccountName} | Group-Object | %{$_.Name}

List the names of the security principals that added or removed members from a particular group during last month.

Example 4

C:\PS>Get-QARSOperation -TargetObject ‘domain\user’ -OperationType ‘Modify’ -ChangedAttributes ‘edsaPassword’ | %{$_.InitiatorInfo.NTAccountName} | Group-Object | select Name

List the names of the security principals that changed or reset the password of a particular user account.

Example 5

C:\PS>Get-QARSOperation -CompletedRecently ([TimeSpan]::FromDays(7)) -TargetObjectType user -ParentContainer ‘test.domain.com/container’ -InitiatedBy ‘MyDomain\JSmith’ | %{$_.TargetObjectInfo.DN}

List all user accounts from a particular container that were changed by the user ‘MyDomain\JSmith’ during last week.

Example 6

C:\PS>Get-QARSOperation -TargetObject ‘domain\user’ -ChangedAttributes l,streetAddress -CompletedOn ((get-date).AddDays(-1)) | %{$_.InitiatorInfo.NTAccountName} | Group-Object | select Name

List the names of the security principals that changed the City (l) or Street Address (streetAddress) attribute on the account of a particular user account yesterday.

Example 7

C:\PS>Get-QARSOperation -ParentContainer test.domain.com/container -TargetObjectType group -OperationType ‘GroupMembershipChange’ -CompletedAfter (get-date -year 2008 -month 9 -day 15 -hour 0 -minute 0 -second 0) -CompletedBefore (get-date -year 2008 -month 9 -day 30 -hour 23 -minute 59 -second 59) | %{$_.TargetObjectInfo.DN} | Group-Object | %{$_.Name}

List the groups from a particular container that had the membership list (Members attribute) changed during the time period from September 15, 2008 to September 30, 2008.



Viewing all articles
Browse latest Browse all 85

Trending Articles