{"id":1432,"date":"2014-01-02T09:05:24","date_gmt":"2014-01-02T09:05:24","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=1432"},"modified":"2014-01-02T09:05:24","modified_gmt":"2014-01-02T09:05:24","slug":"script-addremove-a-domain-user-tofrom-local-administrators-group","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=1432","title":{"rendered":"Script: Add\/Remove a Domain User to\/from Local Administrators Group"},"content":{"rendered":"<p><strong>Add\u00a0<\/strong><strong>Domain User from Local Administrator Group<\/strong><\/p>\n<p>So you need to add a domain user to local administrators group. Besides the fact that you expose the organization, computer, and the various security risks. Here are a few ways to do this.<\/p>\n<p>There are a number of ways to add domain user to local administrator group.\u00a0 I\u2019ll show how to do this with a simple script<\/p>\n<pre><em>===SCRIPT BEGIN===<\/em>\r\n<em>net localgroup administrators MyDomain.local\\%username% \/add<\/em><\/pre>\n<p><em>===SCRIPT END===<\/em><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p>Just copy this script, change the domain name and run through Login Script.<\/p>\n<p><strong>Remove Domain User from Local Administrator Group<br \/>\n<\/strong><\/p>\n<p>As you\u2019ve seen above, the script adds a domain user local administrators group.<\/p>\n<p>You can use the same script to delete the user, just change the Switch to: \/del:<\/p>\n<pre><em>===SCRIPT BEGIN===<\/em>\r\n<em>net localgroup administrators MyDomain.local\\%username% \/del<\/em><\/pre>\n<p><em>===SCRIPT END===<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>thanks\u00a0 &#8211; MSGeek<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Add\u00a0Domain User from Local Administrator Group So you need to add a domain user to local administrators group. Besides the fact that you expose the organization, computer, and the various security risks. Here are a few ways to do this. There are a number of ways to add domain user to local administrator group.\u00a0 I\u2019ll [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"class_list":["post-1432","post","type-post","status-publish","format-standard","hentry","category-gpo-group-policy"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/1432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1432"}],"version-history":[{"count":2,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/1432\/revisions"}],"predecessor-version":[{"id":1434,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/1432\/revisions\/1434"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}