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.
The domain contains a user named User1 and a globalsecurity 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.
The domain contains a user named User1 and a globalsecurity group named Group1.
You need to modify the SAM account name of Group1.
Which cmdlet should you run?

A.
Add-AdPrincipalGroupMembership

B.
Install AddsDomainControNer

C.
Install WindowsFeature

D.
Install AddsDomain

E.
Rename-AdObject

F.
Set-AdAccountControl

G.
Set-AdGroup

H.
Set-User



Leave a Reply 24

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

10 + twenty =


Puck

Puck

Set-ADGroup can be used to modify the properties of an AD DS group objects. Set-ADGroup has a predefined list of properties that can modified, including the following:

■GroupScope
■ManagedBy
■DisplayName
■SAMAccountName
■GroupCategory
■Description
■HomePage

When using Set-ADGroup, you must specify the group that you want to modify. You can use the following formats to specify the group you want to modify:

■DN
■GUID
■SID
■SAM account name

Grant

Grant

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.

Green Hosting

Green Hosting

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

devon

devon

Thanks really useful

han

han

Rename-Object renames only DN. There are multiple names associated with user or group.

FirstName (GivenName)
Initials(initial)
LastName (Surname)
Displayname (displayname)
User Login Name (SAMAccountName)

All of these can be changed using Set-ADUser cmdlet.
But when you run Get-ADUser -Filter ‘name -like “User10″‘, you will get one more name attribute, ‘name’. This attribute ‘name’ is read from user DN. So in order to change this ‘name’ attribute value, you have to modify user DN. This is only possible by using Rename-ADObject. For rest of renaming jobs, use Set-ADUser or Set-ADGroup as above.

han

han

So the answer is Set-ADGroup, not Rename-ADObject as others mentioned.

Dim

Dim

Yes it should be “set-adgroup” (answer G) the good one.

Marek

Marek

There is NO good answer !!!

Set-ADUser -Identity:”CN=*,OU=*,DC=*,DC=*” SamAccountName:”***” -Server:”server1.test.com”

Do it in Active Directory Administrative Center manually and check Powershell history.

Salim

Salim

G is probably the correct answer, because H reads “Set-User” which is not a valid PS command as compare to “Set-ADUser”

JoeTech

JoeTech

I had this question but Set-ADGroup was not one of my choices. I had all the same choices in same order A-F. In that case I think I would go with Rename-AdObject.

LJ

LJ

I’d say G is correct.

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

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.

Hoang

Hoang

I think the answer would be E
Rename AdObject

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

Just look the title of this section

Biloux

Biloux

just read the “details” section of your link :

“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 cmdle”

correct answer is G

Calin

Calin

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.

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

Rawad

Rawad

It’s 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

Google

Google

Please check out the web-sites we follow, like this one, as it represents our picks through the web.

Dolittle

Dolittle

Taken from Microsoft website

“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.”

BR

edgar

edgar

G.–Set-AdGroup
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.