Change Owner for security Group

Hello there, 

i am looking for the syntax to change owner in a security group with powershell 

thanks!

February 17th, 2015 8:14am

Hi,

Set-ADGroup cmdlet with -ManagedBy parameter.

  • Proposed as answer by jrv 22 hours 17 minutes ago
Free Windows Admin Tool Kit Click here and download it now
February 17th, 2015 8:20am

I think Managedby and Owner (from security advanced) is not the same....

February 17th, 2015 8:39am

You're right, they are not the same. In that case it would be best to use Get-Acl to get acl, modify it, and than apply the change with Set-Acl.
Free Windows Admin Tool Kit Click here and download it now
February 17th, 2015 8:48am

yes i sad that is the command, just i need help with the syntax..i can not found any example with 

"security owner change"

February 17th, 2015 8:57am

This should work:

$group = [LDAP]...
$acl = Get-Acl $group
$acl.SetOwner([Security.Principal.NTaccount] "Domain\Login" )
Set-Acl -Path $group -AclObject $acl

Free Windows Admin Tool Kit Click here and download it now
February 17th, 2015 9:17am

ManagedBy controls who has the ability to change a group.  We do not set Owner on groups.  AD objects are owned by System  or Administrators Group and, on occasion, Account Operators.
February 17th, 2015 2:20pm

Hi,

Set-ADGroup cmdlet with -ManagedBy parameter.

  • Proposed as answer by jrv Tuesday, February 17, 2015 1:13 PM
Free Windows Admin Tool Kit Click here and download it now
February 17th, 2015 4:13pm

You're right, they are not the same. In that case it would be best to use Get-Acl to get acl, modify it, and than apply the change with Set-Acl.
February 17th, 2015 4:41pm

This should work:

$group = [LDAP]...
$acl = Get-Acl $group
$acl.SetOwner([Security.Principal.NTaccount] "Domain\Login" )
Set-Acl -Path $group -AclObject $acl

  • Marked as answer by Gustav032 47 minutes ago
Free Windows Admin Tool Kit Click here and download it now
February 17th, 2015 5:10pm

This should work:

$group = [LDAP]...
$acl = Get-Acl $group
$acl.SetOwner([Security.Principal.NTaccount] "Domain\Login" )
Set-Acl -Path $group -AclObject $acl

  • Marked as answer by Gustav032 Monday, February 23, 2015 10:46 AM
February 17th, 2015 5:10pm

Oh thhanks, this works, but 

works for user account domains (contoso\useraccount)

if i want to change owner to a group administratos (contoso\administrators) 

i hace a error 



Free Windows Admin Tool Kit Click here and download it now
February 23rd, 2015 3:23am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics