Which cmdlet should you run?

Your network contains an Active Directory forest named contoso.com. The forest contains a
single domain. The domain contains two domain controllers named DC1 and DC2 that run
Windows Server 2012 R2.
The domain contains a user named User1 and a global security group named Group1.
You need to modify the SAM account name of Group1.
Which cmdlet should you run?

Your network contains an Active Directory forest named contoso.com. The forest contains a
single domain. The domain contains two domain controllers named DC1 and DC2 that run
Windows Server 2012 R2.
The domain contains a user named User1 and a global security group named Group1.
You need to modify the SAM account name of Group1.
Which cmdlet should you run?

A.
Add-AdPrincipalGroupMembership

B.
Install-AddsDomainController

C.
Install-WindowsFeature

D.
Install-AddsDomain

E.
Rename AdObject

F.
Set AdAccountControl

G.
Set-AdGroup

H.
Set-User



Leave a Reply 20

Your email address will not be published. Required fields are marked *

twenty − eighteen =


jaido

jaido

should be set-ADgroup…

Syed

Syed

E is right answer:

Rename-ADObject [-Identity] [-NewName] [-AuthType { | }] [-Credential ] [-Partition ] [-PassThru] [-Server ] [-Confirm] [-WhatIf] []

cutedevil

cutedevil

jaido is right; G is the answer

To modify the Security Accounts Manager (SAM) account name of a user, computer, or group, use the Set-ADUser, Set-ADComputer or Set-ADGroup cmdlet.

http://technet.microsoft.com/en-us/library/ee617225.aspx

Set-ADGroup [-Identity] [-Add ] [-Clear ] [-Description ] [-DisplayName ] [-GroupCategory ] [-GroupScope ] [-HomePage ] [-ManagedBy ] [-Remove ] [-Replace ] [-SamAccountName ] [-AuthType { | }] [-Credential ] [-Partition ] [-PassThru ] [-Server ] [-Confirm] [-WhatIf] []

Klaus

Klaus

G is correct

Walter

Walter

G is the correct one.

The Rename-ADObject cmdlet renames an Active Directory object. This cmdlet sets the Name property of an Active Directory object that has an LDAP Display Name (ldapDisplayName) of “name”. To modify the given name, surname and other name of a user, use the Set-ADUser cmdlet. To modify the Security Accounts Manager (SAM) account name of a user, computer, or group, use the Set-ADUser, Set-ADComputer or Set-ADGroup cmdlet.

From

Oz

Oz

Cutedevil is right!
More clear impossible. Thanks!

cowpoo

cowpoo

I’ve tested this on my lab.

E is the correct answer.

Although you can modify many properties using Set-ADGroup but not for the eSAM name

Fernando

Fernando

You just change the Display Name, not the SAM name i think.

Tobi

Tobi

Rename-ADObject would not change the SAMAcountName. It renams the display Name in Active Directory. Tested on lab.

The answer is G.

Frank

Frank

The Rename-ADObject cmdlet renames an Active Directory object. This cmdlet sets the Name property of an Active Directory object that has an LDAP Display Name (ldapDisplayName) of “name”. To modify the given name, surname and other name of a user, use the Set-ADUser cmdlet. To modify the Security Accounts Manager (SAM) account name of a user, computer, or group, use the Set-ADUser, Set-ADComputer or Set-ADGroup cmdlet.

Ben

Ben

The correct answer is G

The Rename-ADObject cmdlet renames an Active Directory object. This cmdlet sets the Name property of an Active Directory object that has an LDAP Display Name (ldapDisplayName) of “name”. To modify the given name, surname and other name of a user, use the Set-ADUser cmdlet. To modify the Security Accounts Manager (SAM) account name of a user, computer, or group, use the Set-ADUser, Set-ADComputer or Set-ADGroup cmdlet.

imfusio

imfusio

Tested in lab:

Changes SAM account name (pre-windows 2000 name. Can also change Display Name with -DisplayName)
Get-ADGroup TestGroup1 | Set-ADGroup -SamAccountName TestGroup2

Changes Name (CN) property (but does not change SAM account name OR the DisplayName):
Rename-ADObject -Identity “cn=Group1,ou=Lab Users,dc=hvlab,dc=local” -NewName Group2

So since this question asks for SAMAccountName, answer should be: G. Set-ADGroup
It should not be Rename-ADObject: It does not ask for the container Name property to be changed.

imfusio

imfusio

You can try this for yourself, and actually see it using
Get-ADGroup TestGroup1 -Properties *
After trying both Set-ADGroup and Rename-ADObject cmdlets. This proves what properties are actually changed.

Yinka

Yinka

G is the correct answer!

To modify the Security Accounts Manager (SAM) account name of a user, computer, or group, use the Set-ADUser, Set-ADComputer or Set-ADGroup cmdlet.

https://technet.microsoft.com/en-us/library/ee617225.aspx

This site needs to be sorted out. Microsoft does a good job of confusing people already, need to be sure of right answers before proceeding!

Rick

Rick

The correct answer should be G as per MS:
https://technet.microsoft.com/en-us/library/ee617225.aspx

The Rename-ADObject cmdlet renames an Active Directory object. This cmdlet sets the Name property of an Active Directory object that has an LDAP Display Name (ldapDisplayName) of “name”. To modify the given name, surname and other name of a user, use the Set-ADUser cmdlet. To modify the Security Accounts Manager (SAM) account name of a user, computer, or group, use the Set-ADUser, Set-ADComputer or Set-ADGroup cmdlet.

Thanks