{"id":4526,"date":"2015-07-24T09:49:39","date_gmt":"2015-07-24T09:49:39","guid":{"rendered":"http:\/\/ngenioussolutions.com\/blog\/?p=86"},"modified":"2025-12-01T13:17:31","modified_gmt":"2025-12-01T13:17:31","slug":"how-to-update-sharepoints-group-owner-using-powershell","status":"publish","type":"post","link":"https:\/\/ngenioussolutions.com\/blog\/how-to-update-sharepoints-group-owner-using-powershell\/","title":{"rendered":"How to update SharePoint&#8217;s Group Owner using PowerShell"},"content":{"rendered":"<p>#Enter the site URL for which the group owner needs to be updated<br \/>\n$webUrl = &#8220;http:\/\/test.company.com\/man&#8221;<\/p>\n<p>Write-Output &#8220;Getting site object&#8221;<br \/>\n$web = Get-SPWeb $webUrl<br \/>\nWrite-Output &#8220;Success&#8221;<\/p>\n<p>Write-Output &#8220;Getting User Group&#8221;<br \/>\n$spGroups = $web.groups<br \/>\n#Get the owner group<br \/>\n$UserGroup = $spGroups | where {$_.Name -eq &#8220;User&#8221;}<br \/>\nWrite-Output &#8220;Success&#8221;<\/p>\n<p>foreach($group in $spGroups)<br \/>\n{<br \/>\nif($group.Name.StartsWith(&#8220;User&#8221;))<br \/>\n{<br \/>\nWrite-Output &#8220;Updating owner of group &#8211; $group&#8221;<br \/>\n$group.Owner = $UserGroup<br \/>\n$group.Update()<br \/>\nWrite-Output &#8220;Successfully updated&#8221;<br \/>\n}<br \/>\n}<\/p>\n<p>$web.Dispose()<br \/>\nWrite-Output &#8220;script ended&#8221;<\/p>\n<div style=\"background-color: #efefef; margin-top: 30px; padding: 20px 30px; text-align: left; border-radius: 3px;\">\n<p><span style=\"font-size: 18px; font-weight: 500;\">Related Article:<\/span><\/p>\n<ul style=\"font-size: 21px;\">\n<li><a href=\"https:\/\/ngenioussolutions.com\/blog\/blog-delete-all-sharepoint-list-item-using-powershell\/\">Delete all sharepoint list item using powershell<\/a><\/li>\n<li style=\"margin-top: 10px;\"><a href=\"https:\/\/ngenioussolutions.com\/blog\/get-extract-of-files-modified-after-particular-date-from-sharepoint-library-or-folder-within-library-powershell-script\/\">Get extract of files modified after particular date from SharePoint library or folder within library (PowerShell script)<\/a><\/li>\n<li style=\"margin-top: 10px;\"><a href=\"https:\/\/ngenioussolutions.com\/blog\/bulk-delete-sharepoint-list-items-using-csom\/\">Bulk delete SharePoint List items using CSOM<\/a><\/li>\n<li style=\"margin-top: 10px;\"><a href=\"https:\/\/ngenioussolutions.com\/blog\/window-scroll-event-is-not-firing-in-sharepoint\/\">Window scroll event is not firing in SharePoint<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>#Enter the site URL for which the group owner needs to be updated $webUrl = &#8220;http:\/\/test.company.com\/man&#8221; Write-Output &#8220;Getting site object&#8221; $web = Get-SPWeb $webUrl Write-Output&#8230;<\/p>\n","protected":false},"author":1,"featured_media":8732,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[210],"tags":[],"class_list":["post-4526","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-sharepoint-blogs"],"menu_order":0,"_links":{"self":[{"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=4526"}],"version-history":[{"count":5,"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4526\/revisions"}],"predecessor-version":[{"id":12492,"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4526\/revisions\/12492"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/media\/8732"}],"wp:attachment":[{"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}