< Back

Restore-ActiveDirectoryAttribute

Mon Jan 13, 2020 6:00 am

NAME Restore-ActiveDirectoryAttribute



SYNOPSIS

Restore Active Directory attributes.





SYNTAX

Restore-ActiveDirectoryAttribute [-ObjectGUID] <String> [-Attribute] <String[]> [-ProductionServer] <String>

[-SnapshotServer] <String> [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Restore Active Directory object attributes using an Active Directory snapshot





PARAMETERS

-ObjectGUID <String>

The ObjectGUID of the Active Directory object



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Attribute <String[]>

The attribute to restore



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ProductionServer <String>

The production server



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SnapshotServer <String>

The snapshot server



Required? true

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\Windows\\system32>$guid = (Get-ADUser cpolydorou).ObjectGUID



PS C:\\Windows\\system32> Restore-ActiveDirectoryAttribute -ObjectGUID $guid -ProductionServer localhost

-SnapshotServer localhost:33389 -Attribute sn,givenname -Verbose

VERBOSE: Performing the operation "Restore attribute sn" on target "CN=Christos

Polydorou,OU=Users,OU=LAB,DC=LAB,DC=local".

VERBOSE: Performing the operation "Restore attribute givenname" on target "CN=Christos

Polydorou,OU=Users,OU=LAB,DC=LAB,DC=local".



Restore the sn and givenname attributes for user "cpolydorou"











RELATED LINKS