{"id":1755,"date":"2019-08-09T10:29:54","date_gmt":"2019-08-09T09:29:54","guid":{"rendered":"https:\/\/hypervlab.co.uk\/?p=1755"},"modified":"2019-08-09T10:30:02","modified_gmt":"2019-08-09T09:30:02","slug":"managing-organisation-units-with-microsoft-powershell","status":"publish","type":"post","link":"https:\/\/hypervlab.co.uk\/?p=1755","title":{"rendered":"Managing Organisation Units with Microsoft Powershell"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 4<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>\n<p>In this blog post, I will cover the principles of creating Organisational Units using Microsoft Powershell. <\/p>\n\n\n\n<p><strong>Pre-Note<\/strong>: This post, presumes that you have an active directory server already configured and an understanding of PowerShell active directory modules. <br>If you want to learn about deploying Active Directory [<a rel=\"noreferrer noopener\" aria-label=\"Check Here (opens in a new tab)\" href=\"https:\/\/hypervlab.co.uk\/2019\/06\/deploying-active-directory-on-windows-server-2019\/\" target=\"_blank\">Check Here<\/a>]<\/p>\n\n\n\n<p>Ok so first step, if you are using a remote server, you will want to check that you have the following RSAT-AD Management Tools installed.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-WindowsFeature | Where 'Name' -like '*RSAT-AD*'<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"303\" src=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-44-1024x303.png\" alt=\"\" class=\"wp-image-1760\" srcset=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-44-1024x303.png 1024w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-44-300x89.png 300w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-44-768x227.png 768w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-44.png 1054w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>To install the AD RSAT Tools we can use the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-WindowsFeature | Where Name -like *RSAT-AD* | Install-WindowsFeature -Verbose<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"214\" src=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-45-1024x214.png\" alt=\"\" class=\"wp-image-1761\" srcset=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-45-1024x214.png 1024w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-45-300x63.png 300w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-45-768x161.png 768w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-45.png 1113w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Next, we need to import the ActiveDirectory Powershell Module into the current session.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Import-Module -Name 'ActiveDirectory'<\/code><\/pre>\n\n\n\n<p>As we only need a specific set of commands for the post, we can use the Where-Object and filter the Active Directory COmmands to just to *Organisational*.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Command -Module 'ActiveDirectory' | Where Name -like '*Organizational*'<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"208\" src=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-42.png\" alt=\"\" class=\"wp-image-1758\" srcset=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-42.png 926w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-42-300x67.png 300w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-42-768x173.png 768w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>This is the current ad.hypervlab.co.uk Domain with Pre-Configured Organisational Units. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"907\" height=\"653\" src=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-43.png\" alt=\"\" class=\"wp-image-1759\" srcset=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-43.png 907w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-43-300x216.png 300w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-43-768x553.png 768w\" sizes=\"auto, (max-width: 907px) 100vw, 907px\" \/><\/figure>\n\n\n\n<p>To Create a new Organisational Unit we need the root of the domain. <br>DC=ad,DC=hypervlab,DC=co,DC=uk and then the root OU which we want to create additional OUs under. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"386\" height=\"140\" src=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-47.png\" alt=\"\" class=\"wp-image-1764\" srcset=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-47.png 386w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-47-300x109.png 300w\" sizes=\"auto, (max-width: 386px) 100vw, 386px\" \/><\/figure><\/div>\n\n\n\n<p>So to create an Organisation Unit in the root of the domain we can use the following command below.<\/p>\n\n\n\n<p><strong>NOTE: <\/strong>When using Windows Server 2016 Functional Level, it now looks like that all Organisational Units are protected from accidental deletion.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>New-ADOrganizationalUnit -Name 'Pwsh-OU' -Path 'DC=ad,DC=hypervlab,DC=co,DC=uk'\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1023\" height=\"173\" src=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-49.png\" alt=\"\" class=\"wp-image-1766\" srcset=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-49.png 1023w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-49-300x51.png 300w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-49-768x130.png 768w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-49-1022x173.png 1022w\" sizes=\"auto, (max-width: 1023px) 100vw, 1023px\" \/><\/figure>\n\n\n\n<p>Now Refreshing the Active Directory Users and Computers we can see the OU we created.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"621\" height=\"299\" src=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-50.png\" alt=\"\" class=\"wp-image-1767\" srcset=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-50.png 621w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-50-300x144.png 300w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Creating Multiple OUs<\/strong><\/h4>\n\n\n\n<p>One of the reasons why I learnt PowerShell was to help with automation when building new lab environments from time to time, I&#8217;ve worked on various scripts to help me save time, and occasionally use them in production environments. In the example below is a script which shows how can go from a green active directory to having a complete OU Structure deployed within a matter of minutes. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Import Active Directory Module\nImport-Module -Name ActiveDirectory\n\n# Top Level \nNew-ADOrganizationalUnit -Name \"HYPERVLAB\" \n\n# Sub Top Level \nNew-ADOrganizationalUnit -Name \"User Accounts\" -Path \"OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \nNew-ADOrganizationalUnit -Name \"Company Directors\" -Path \"OU=User Accounts,OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \nNew-ADOrganizationalUnit -Name \"Human Resources\" -Path \"OU=User Accounts,OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \nNew-ADOrganizationalUnit -Name \"Account Managers\" -Path \"OU=User Accounts,OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \nNew-ADOrganizationalUnit -Name \"Company Directors\" -Path \"OU=User Accounts,OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \n\n# Sub Top Level \nNew-ADOrganizationalUnit -Name \"Workstations\" -Path \"OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \nNew-ADOrganizationalUnit -Name \"Floor_1\" -Path \"OU=Workstations,OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \nNew-ADOrganizationalUnit -Name \"Floor_2\" -Path \"OU=Workstations,OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \n\n# Sub Top Level \nNew-ADOrganizationalUnit -Name \"Infrastucture\" -Path \"OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \nNew-ADOrganizationalUnit -Name \"Service Accounts\" -Path \"OU=Infrastucture,OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \nNew-ADOrganizationalUnit -Name \"Virtual Hosts\" -Path \"OU=Infrastucture,OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \nNew-ADOrganizationalUnit -Name \"Physical Servers\" -Path \"OU=Infrastucture,OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \nNew-ADOrganizationalUnit -Name \"Virtual Servers\" -Path \"OU=Infrastucture,OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \nNew-ADOrganizationalUnit -Name \"Remote Desktop Cluster\" -Path \"OU=Infrastucture,OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \n\n# Sub Top Level \nNew-ADOrganizationalUnit -Name \"Security Groups\" -Path \"OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \nNew-ADOrganizationalUnit -Name \"Security\" -Path \"OU=Security Groups,OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" \nNew-ADOrganizationalUnit -Name \"Distribution\" -Path \"OU=Security Groups,OU=HYPERVLAB,DC=ad,DC=hypervlab,DC=co,DC=uk\" <\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Removing an Organisational Unit with Powershell<\/strong><\/h4>\n\n\n\n<p>To Remove an Organisational UNit with Powershell, firstly we need to remove the delete protection parameter. The graphic below shows the error you would review with the delete protection enabled.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"191\" src=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-41-1024x191.png\" alt=\"\" class=\"wp-image-1770\" srcset=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-41-1024x191.png 1024w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-41-300x56.png 300w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-41-768x143.png 768w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-41.png 1293w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>To Disable the delete protection we can run the following PowerShell Command <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-ADOrganizationalUnit 'OU=Pwsh-OU,DC=ad,DC=hypervlab,DC=co,DC=uk' -ProtectedFromAccidentalDeletion $false<\/code><\/pre>\n\n\n\n<p>Now if we check the OU Object Properties we can see that the delete protection has been revoked and is now ready for delete.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"455\" src=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-46.png\" alt=\"\" class=\"wp-image-1771\" srcset=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-46.png 400w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-46-264x300.png 264w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/figure><\/div>\n\n\n\n<p>Now running the following command to remove the Organisation Unit, Notice the error message as not prompted and the Organisational Unit as been removed from the OU <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Remove-ADOrganizationalUnit 'OU=Pwsh-OU,DC=ad,DC=hypervlab,DC=co,DC=uk'<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"898\" height=\"150\" src=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-48.png\" alt=\"\" class=\"wp-image-1772\" srcset=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-48.png 898w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-48-300x50.png 300w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-48-768x128.png 768w\" sizes=\"auto, (max-width: 898px) 100vw, 898px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"611\" height=\"276\" src=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-52.png\" alt=\"\" class=\"wp-image-1774\" srcset=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-52.png 611w, https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/image-52-300x136.png 300w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 4<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>In this blog post, I will cover the principles of creating Organisational Units using Microsoft Powershell. Pre-Note: This post, presumes that you have an active directory server already configured and an understanding of PowerShell active directory modules. If you want to learn about deploying Active Directory [Check Here] Ok so first step, if you are [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1769,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[69,34],"tags":[96,216,218,92,217,99],"class_list":["post-1755","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-active-directory","category-windows-server","tag-activedirectory","tag-automation","tag-organisationalunit","tag-powershell","tag-scripts","tag-windowsserver"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Managing Organisation Units with Microsoft Powershell - HypervLAB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hypervlab.co.uk\/?p=1755\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Managing Organisation Units with Microsoft Powershell - HypervLAB\" \/>\n<meta property=\"og:description\" content=\"Reading Time:  4 minutesIn this blog post, I will cover the principles of creating Organisational Units using Microsoft Powershell. Pre-Note: This post, presumes that you have an active directory server already configured and an understanding of PowerShell active directory modules. If you want to learn about deploying Active Directory [Check Here] Ok so first step, if you are [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hypervlab.co.uk\/?p=1755\" \/>\n<meta property=\"og:site_name\" content=\"HypervLAB\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-09T09:29:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-08-09T09:30:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/FeatureImage_ManagingOUwithPowershell.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Simon Lee\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/smoon_lee\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Simon Lee\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/hypervlab.co.uk\/?p=1755\",\"url\":\"https:\/\/hypervlab.co.uk\/?p=1755\",\"name\":\"Managing Organisation Units with Microsoft Powershell - HypervLAB\",\"isPartOf\":{\"@id\":\"https:\/\/hypervlab.co.uk\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/hypervlab.co.uk\/?p=1755#primaryimage\"},\"image\":{\"@id\":\"https:\/\/hypervlab.co.uk\/?p=1755#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/FeatureImage_ManagingOUwithPowershell.png\",\"datePublished\":\"2019-08-09T09:29:54+00:00\",\"dateModified\":\"2019-08-09T09:30:02+00:00\",\"author\":{\"@id\":\"https:\/\/hypervlab.co.uk\/#\/schema\/person\/7d184970612a9c6a5f1babb8b6b4d359\"},\"breadcrumb\":{\"@id\":\"https:\/\/hypervlab.co.uk\/?p=1755#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/hypervlab.co.uk\/?p=1755\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/hypervlab.co.uk\/?p=1755#primaryimage\",\"url\":\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/FeatureImage_ManagingOUwithPowershell.png\",\"contentUrl\":\"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/FeatureImage_ManagingOUwithPowershell.png\",\"width\":1200,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/hypervlab.co.uk\/?p=1755#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/hypervlab.co.uk\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Managing Organisation Units with Microsoft Powershell\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/hypervlab.co.uk\/#website\",\"url\":\"https:\/\/hypervlab.co.uk\/\",\"name\":\"HypervLAB\",\"description\":\"Blogging about all thing Microsoft\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/hypervlab.co.uk\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/hypervlab.co.uk\/#\/schema\/person\/7d184970612a9c6a5f1babb8b6b4d359\",\"name\":\"Simon Lee\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/hypervlab.co.uk\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9473a3cf9c75192508eccfd9d072efab80adf04a45083e561d0e3065f681c34c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9473a3cf9c75192508eccfd9d072efab80adf04a45083e561d0e3065f681c34c?s=96&d=mm&r=g\",\"caption\":\"Simon Lee\"},\"description\":\"Hi, I'm Simon an IT Enthusiast, PowerShell Geek, Gamer, and Sound Engineer. I've been working with in the IT Industry for around 6 years and have worked across private and public sector companies. The original idea behind \\\"hypervlab\\\" was that I required an 'RnD' environment which would allow me to be able to replicate any kind of enterprise on-premise environment which I could use for learning and testing without learning in a production environment. So in 2019, I decided to branch out and use the domain for a public facing blog to be able to contribute to the IT Community about all things Microsoft.\",\"sameAs\":[\"https:\/\/hypervlab.co.uk\",\"https:\/\/www.linkedin.com\/in\/simon-john-lee\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/smoon_lee\"],\"url\":\"https:\/\/hypervlab.co.uk\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Managing Organisation Units with Microsoft Powershell - HypervLAB","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hypervlab.co.uk\/?p=1755","og_locale":"en_GB","og_type":"article","og_title":"Managing Organisation Units with Microsoft Powershell - HypervLAB","og_description":"Reading Time:  4 minutesIn this blog post, I will cover the principles of creating Organisational Units using Microsoft Powershell. Pre-Note: This post, presumes that you have an active directory server already configured and an understanding of PowerShell active directory modules. If you want to learn about deploying Active Directory [Check Here] Ok so first step, if you are [&hellip;]","og_url":"https:\/\/hypervlab.co.uk\/?p=1755","og_site_name":"HypervLAB","article_published_time":"2019-08-09T09:29:54+00:00","article_modified_time":"2019-08-09T09:30:02+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/FeatureImage_ManagingOUwithPowershell.png","type":"image\/png"}],"author":"Simon Lee","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/smoon_lee","twitter_misc":{"Written by":"Simon Lee","Estimated reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/hypervlab.co.uk\/?p=1755","url":"https:\/\/hypervlab.co.uk\/?p=1755","name":"Managing Organisation Units with Microsoft Powershell - HypervLAB","isPartOf":{"@id":"https:\/\/hypervlab.co.uk\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hypervlab.co.uk\/?p=1755#primaryimage"},"image":{"@id":"https:\/\/hypervlab.co.uk\/?p=1755#primaryimage"},"thumbnailUrl":"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/FeatureImage_ManagingOUwithPowershell.png","datePublished":"2019-08-09T09:29:54+00:00","dateModified":"2019-08-09T09:30:02+00:00","author":{"@id":"https:\/\/hypervlab.co.uk\/#\/schema\/person\/7d184970612a9c6a5f1babb8b6b4d359"},"breadcrumb":{"@id":"https:\/\/hypervlab.co.uk\/?p=1755#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hypervlab.co.uk\/?p=1755"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/hypervlab.co.uk\/?p=1755#primaryimage","url":"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/FeatureImage_ManagingOUwithPowershell.png","contentUrl":"https:\/\/hypervlab.co.uk\/wp-content\/uploads\/2019\/08\/FeatureImage_ManagingOUwithPowershell.png","width":1200,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/hypervlab.co.uk\/?p=1755#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hypervlab.co.uk\/"},{"@type":"ListItem","position":2,"name":"Managing Organisation Units with Microsoft Powershell"}]},{"@type":"WebSite","@id":"https:\/\/hypervlab.co.uk\/#website","url":"https:\/\/hypervlab.co.uk\/","name":"HypervLAB","description":"Blogging about all thing Microsoft","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hypervlab.co.uk\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/hypervlab.co.uk\/#\/schema\/person\/7d184970612a9c6a5f1babb8b6b4d359","name":"Simon Lee","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/hypervlab.co.uk\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9473a3cf9c75192508eccfd9d072efab80adf04a45083e561d0e3065f681c34c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9473a3cf9c75192508eccfd9d072efab80adf04a45083e561d0e3065f681c34c?s=96&d=mm&r=g","caption":"Simon Lee"},"description":"Hi, I'm Simon an IT Enthusiast, PowerShell Geek, Gamer, and Sound Engineer. I've been working with in the IT Industry for around 6 years and have worked across private and public sector companies. The original idea behind \"hypervlab\" was that I required an 'RnD' environment which would allow me to be able to replicate any kind of enterprise on-premise environment which I could use for learning and testing without learning in a production environment. So in 2019, I decided to branch out and use the domain for a public facing blog to be able to contribute to the IT Community about all things Microsoft.","sameAs":["https:\/\/hypervlab.co.uk","https:\/\/www.linkedin.com\/in\/simon-john-lee\/","https:\/\/x.com\/https:\/\/twitter.com\/smoon_lee"],"url":"https:\/\/hypervlab.co.uk\/?author=2"}]}},"_links":{"self":[{"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1755","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1755"}],"version-history":[{"count":0,"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1755\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=\/wp\/v2\/media\/1769"}],"wp:attachment":[{"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hypervlab.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}