{"id":49,"date":"2024-01-06T12:13:26","date_gmt":"2024-01-06T12:13:26","guid":{"rendered":"https:\/\/harrisonjonesit.co.uk\/?p=49"},"modified":"2024-01-17T16:46:41","modified_gmt":"2024-01-17T16:46:41","slug":"http-harrisonjonesit-co-uk-wp-content-uploads-2024-01-ad-px-1-jpg","status":"publish","type":"post","link":"https:\/\/harrisonjonesit.co.uk\/?p=49","title":{"rendered":"Active Directory Administration"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"49\" class=\"elementor elementor-49\">\n\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9ec5aa4 e-flex e-con-boxed e-con e-parent\" data-id=\"9ec5aa4\" data-element_type=\"container\" data-settings=\"{&quot;content_width&quot;:&quot;boxed&quot;}\" data-core-v316-plus=\"true\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-dfd1b85 elementor-widget elementor-widget-heading\" data-id=\"dfd1b85\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.18.0 - 20-12-2023 *\/\n.elementor-heading-title{padding:0;margin:0;line-height:1}.elementor-widget-heading .elementor-heading-title[class*=elementor-size-]>a{color:inherit;font-size:inherit;line-height:inherit}.elementor-widget-heading .elementor-heading-title.elementor-size-small{font-size:15px}.elementor-widget-heading .elementor-heading-title.elementor-size-medium{font-size:19px}.elementor-widget-heading .elementor-heading-title.elementor-size-large{font-size:29px}.elementor-widget-heading .elementor-heading-title.elementor-size-xl{font-size:39px}.elementor-widget-heading .elementor-heading-title.elementor-size-xxl{font-size:59px}<\/style><h2 class=\"elementor-heading-title elementor-size-default\">Active Directory Administration<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-15ffcc29 e-flex e-con-boxed e-con e-parent\" data-id=\"15ffcc29\" data-element_type=\"container\" data-settings=\"{&quot;content_width&quot;:&quot;boxed&quot;}\" data-core-v316-plus=\"true\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-73fffaa0 elementor-widget elementor-widget-text-editor\" data-id=\"73fffaa0\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.18.0 - 20-12-2023 *\/\n.elementor-widget-text-editor.elementor-drop-cap-view-stacked .elementor-drop-cap{background-color:#69727d;color:#fff}.elementor-widget-text-editor.elementor-drop-cap-view-framed .elementor-drop-cap{color:#69727d;border:3px solid;background-color:transparent}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap{margin-top:8px}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap-letter{width:1em;height:1em}.elementor-widget-text-editor .elementor-drop-cap{float:left;text-align:center;line-height:1;font-size:50px}.elementor-widget-text-editor .elementor-drop-cap-letter{display:inline-block}<\/style>\t\t\t\t<p><!-- wp:paragraph --><\/p>\n<p>I use On-Premise and Azure Active Directory on a daily basis in my job. However when I started the environment was already set up with plenty of users, groups, OU&#8217;s ETC so I decided to create my own virtual environment and fill it with users and groups from PowerShell.<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>Firstly, I created a Virtual Server in Virtual box. this acts as my domain controller. I then created a virtual windows 10 client that will act as the regular using when connecting to the DC and later the internet. please see the network diagram below for a visual demonstration. <\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:image {\"id\":80,\"sizeSlug\":\"large\",\"linkDestination\":\"none\"} --><\/p>\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/harrisonjonesit-co-uk.preview-domain.com\/wp-content\/uploads\/2024\/01\/AD-MAP-1024x576.png\" alt=\"\" class=\"wp-image-80\" srcset=\"https:\/\/harrisonjonesit.co.uk\/wp-content\/uploads\/2024\/01\/AD-MAP-1024x576.png 1024w, https:\/\/harrisonjonesit.co.uk\/wp-content\/uploads\/2024\/01\/AD-MAP-300x169.png 300w, https:\/\/harrisonjonesit.co.uk\/wp-content\/uploads\/2024\/01\/AD-MAP-768x432.png 768w, https:\/\/harrisonjonesit.co.uk\/wp-content\/uploads\/2024\/01\/AD-MAP-1536x864.png 1536w, https:\/\/harrisonjonesit.co.uk\/wp-content\/uploads\/2024\/01\/AD-MAP.png 1737w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>I used a PowerShell Script created by ChatGPT to create 1,000 users in AD to replicate a large business. overall this was a great introduction to windows networking and has allowed me to own my own business style AD Domain for any future projects or testing. If interested see PowerShell script below which worked from ChatGPT first try.<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>$PASSWORD_FOR_USERS = \"Password1\"\n$USER_FIRST_LAST_LIST = Get-Content .\\names.txt\n\n------------------------------------------------------\n\n$password = ConvertTo-SecureString $PASSWORD_FOR_USERS -AsPlainText -Force\nNew-ADOrganizationalUnit -Name _USERS -ProtectedFromAccidentalDeletion $false\n\nforeach ($n in $USER_FIRST_LAST_LIST) {\n$first = $n.Split(\" \")[0].ToLower()\n$last = $n.Split(\" \")[1].ToLower()\n$username = \"$($first.Substring(0,1))$($last)\".ToLower()\nWrite-Host \"Creating user: $($username)\" -BackgroundColor Black -ForegroundColor Cyan\nNew-AdUser -AccountPassword $password `\n           -GivenName $first `\n           -Surname $last `\n           -DisplayName $username `\n           -Name $username `\n           -EmployeeID $username `\n           -PasswordNeverExpires $true `\n           -Path \"ou=_USERS,$(([ADSI]`\"\").distinguishedName)\" `\n           -Enabled $true<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-a2fc1cf e-flex e-con-boxed e-con e-parent\" data-id=\"a2fc1cf\" data-element_type=\"container\" data-settings=\"{&quot;content_width&quot;:&quot;boxed&quot;}\" data-core-v316-plus=\"true\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-c6ed60b e-flex e-con-boxed e-con e-parent\" data-id=\"c6ed60b\" data-element_type=\"container\" data-settings=\"{&quot;content_width&quot;:&quot;boxed&quot;}\" data-core-v316-plus=\"true\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-72f9986 e-flex e-con-boxed e-con e-parent\" data-id=\"72f9986\" data-element_type=\"container\" data-settings=\"{&quot;content_width&quot;:&quot;boxed&quot;}\" data-core-v316-plus=\"true\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Active Directory Administration I use On-Premise and Azure Active Directory on a daily basis in my job. However when I started the environment was already set up with plenty of users, groups, OU&#8217;s ETC so I decided to create my own virtual environment and fill it with users and groups [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/harrisonjonesit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/49"}],"collection":[{"href":"https:\/\/harrisonjonesit.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/harrisonjonesit.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/harrisonjonesit.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/harrisonjonesit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=49"}],"version-history":[{"count":19,"href":"https:\/\/harrisonjonesit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/49\/revisions"}],"predecessor-version":[{"id":341,"href":"https:\/\/harrisonjonesit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/49\/revisions\/341"}],"wp:attachment":[{"href":"https:\/\/harrisonjonesit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/harrisonjonesit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/harrisonjonesit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}