{"id":8216,"date":"2021-11-29T21:16:26","date_gmt":"2021-11-29T20:16:26","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=8216"},"modified":"2021-12-01T10:18:14","modified_gmt":"2021-12-01T09:18:14","slug":"active-directory-export-and-import-a-group-policies","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/active-directory-export-and-import-a-group-policies\/","title":{"rendered":"Active Directory: Export and import a group policies"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_8216 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_8216')){$('.twoclick_social_bookmarks_post_8216').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Active%20Directory%3A%20Export%20and%20import%20a%20group%20policies\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Apowershell%20has%20some%20command%20lets%20to%20deal%20with%20with%20group%20policies.%20The%20command%20lets%20can%20be%20found%20in%20the%20GroupPolicy%20module.%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/active-directory-export-and-import-a-group-policies\\\/\",\"post_id\":8216,\"post_title_referrer_track\":\"Active+Directory%3A+Export+and+import+a+group+policies\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>powershell has some command lets to deal with with group policies. The command lets can be found in the GroupPolicy module.<br \/>\n<!--more--><br \/>\nExporting a group policy can be done by Backup-GPO <\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\nPS D:\\&gt; mkdir D:\\GPOs\r\nPS D:\\&gt; Backup-GPO  -Name Domain-Defender-Config -Path D:\\GPOs\r\nDisplayName     : Domain-Defender-Config\r\nGpoId           : 6128de44-a812-9018-5342-aa2318888d71\r\nId              : 178233e1-1111-54cf-b34e-f3c60cb959ba\r\nBackupDirectory : D:\\GPOs\r\nCreationTime    : 01.01.2020 04:00:55\r\nDomainName      : myDomain.org\r\nComment         :\r\n<\/pre>\n<p>To import the backup of the group policy use Import-GPO. Backup ID is the folder name. The target GPO must already exists or, if you have the permissions, you can set the -CreateIfNeeded parameter.<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\nPS D:\\&gt; dir D:\\GPOs\r\nMode                LastWriteTime         Length Name\r\n----                -------------         ------ ----\r\nd-----       30.11.2021     21:51                {178233e1-1111-54cf-b34e-f3c60cb959ba}\r\nPS D:\\&gt; Import-GPO -BackupId '{178233e1-1111-54cf-b34e-f3c60cb959ba}' -Path D:\\GPOs -TargetName My-Defender-Config\r\n<\/pre>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, powershell has some command lets to deal with with group policies. The command lets can be found in the GroupPolicy module.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1265],"tags":[95,774,153,394,1721,1171,20],"class_list":["post-8216","post","type-post","status-publish","format-standard","hentry","category-active-directory","tag-active-directory","tag-backup","tag-copy","tag-export","tag-group-policy","tag-import","tag-windows-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/8216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=8216"}],"version-history":[{"count":6,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/8216\/revisions"}],"predecessor-version":[{"id":8224,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/8216\/revisions\/8224"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=8216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=8216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=8216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}