{"id":76820,"date":"2022-08-10T10:28:02","date_gmt":"2022-08-10T08:28:02","guid":{"rendered":"https:\/\/jotelulu.com\/en-gb\/blog\/"},"modified":"2025-12-15T17:17:43","modified_gmt":"2025-12-15T16:17:43","slug":"powershell-ad-ds-user-management","status":"publish","type":"post","link":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/","title":{"rendered":"AD DS Server and User Management with PowerShell"},"content":{"rendered":"\r\n<p>Discover the <strong>basic PowerShell commands for managing users on your AD DS Server<\/strong> to speed up and save time in infrastructure management.<\/p>\r\n\r\n\r\n\r\n<p>As we explained in the article 10 PowerShell Commands to Control AD DS Server Objects, \u201c<strong>setting up and managing an IT infrastructure<\/strong> is a demanding task requiring the technical team to invest a <strong>great effort<\/strong>, with <strong>hundreds of hours<\/strong> dedicated to proper planning and configuration, plus hundreds or even thousands of hours of maintenance, including tasks of various kinds.\u201d<\/p>\r\n\r\n\r\n\r\n<p>In that article, we already outlined some commands to help audit the objects in our AD DS Server, specifically user and computer audits, but clearly, that does not cover all tasks. That\u2019s why we decided to write this article, where we will discuss how to <strong>create users and groups<\/strong> and perform <strong>basic management tasks<\/strong> with them.<\/p>\r\n\r\n\r\n\r\n<p>Of course, we recommend initially testing on a separate server, commonly called a \u201csandbox\u201d or \u201cpilot,\u201d rather than a production server. This provides greater freedom and avoids mishaps. If you don\u2019t have an <strong>AD DS Server infrastructure<\/strong> to test, you can follow this tutorial explaining <a href=\"https:\/\/jotelulu.com\/en-gb\/support\/tutorials\/how-to-configure-ad-ds-on-your-windows-server\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Set Up Your AD DS Server in Jotelulu<\/a>.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><strong>How to Manage AD DS Server Users Using PowerShell?<\/strong><\/h2>\r\n\r\n\r\n\r\n<p>Without further ado, let\u2019s start testing and discuss everything we will need, including the different <strong>commands<\/strong> and <strong>modifiers<\/strong> we can use.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\"><strong>Preparing PowerShell Operations with AD DS Server:<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>Before working with PowerShell against Active Directory (AD), we need to <strong>check the version of PowerShell available<\/strong> on the server and <strong>import the AD DS administration module<\/strong>.<\/p>\r\n\r\n\r\n\r\n<p>To check the PowerShell version, we can use the following commands:<\/p>\r\n\r\n\r\n\r\n<p>Get-Host<\/p>\r\n\r\n\r\n\r\n<p>$PSVersionTable<\/p>\r\n\r\n\r\n\r\n<p>$PSVersionTable.PSVersion<\/p>\r\n\r\n\r\n\r\n<p>We can use the <strong>\u201cGet-Host\u201d command<\/strong> without parameters, which returns several <strong>console details<\/strong>, including the <strong>\u201cVersion\u201d parameter<\/strong> indicating the PowerShell version.<\/p>\r\n\r\n\r\n\r\n<p>Alternatively, we can <strong>query the version directly<\/strong> using the <strong>\u201c$PSVersionTable\u201d command<\/strong>, which provides extensive information. To show only the PowerShell version, use <strong>$PSVersionTable.PSVersion<\/strong>.<\/p>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Consultamos20la20versiC3B3n20de20PowerShell20instalada20en20el20sistema-800x455-2.jpg\" alt=\"Check the installed PowerShell version on the system\" \/><\/p>\r\n\r\n\r\n\r\n<p>Check the installed PowerShell version on the system<\/p>\r\n\r\n\r\n\r\n<p>Once confirmed that PowerShell is available, we need to import the module to work with Active Directory.<\/p>\r\n\r\n\r\n\r\n<p>The <strong>module for managing AD DS<\/strong> via PowerShell is <strong>\u201cActiveDirectory\u201d<\/strong>, a straightforward name by Microsoft that simplifies searching.<\/p>\r\n\r\n\r\n\r\n<p>To import the module, open a <strong>PowerShell console with Administrator privileges<\/strong> and run:<\/p>\r\n\r\n\r\n\r\n<p>Import-Module ActiveDirectory<\/p>\r\n\r\n\r\n\r\n<p>The installation is quick, sometimes only showing a brief flash, and it works correctly if no error messages appear.<\/p>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Importamos20el20mC3B3dulo20de20administraciC3B3n20de20Active20Directory20para20PowerShell-800x108-2.jpg\" alt=\"Import Active Directory administration module in PowerShell\" \/><\/p>\r\n\r\n\r\n\r\n<p>Import Active Directory administration module in PowerShell<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\"><strong>Request Domain Information:<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>With the ability to connect to the domain and run commands, we can start by retrieving <strong>information about the forest, domain, and domain controllers<\/strong>.<\/p>\r\n\r\n\r\n\r\n<p>To get <strong>AD DS forest information<\/strong>, run:<\/p>\r\n\r\n\r\n\r\n<p><em>Get-ADForest<\/em><\/p>\r\n\r\n\r\n\r\n<p>This provides information on:<\/p>\r\n\r\n<ul>\r\n<li>Forest name<\/li>\r\n<li>Domains<\/li>\r\n<li>Sites<\/li>\r\n<li>Domain root<\/li>\r\n<li>Partitions<\/li>\r\n<li>Domain naming master<\/li>\r\n<li>Forest functional level<\/li>\r\n<\/ul>\r\n<!-- \/wp:post-content -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><strong>You can filter<\/strong> for specific details, like the Domain Naming Master or Forest Functional Level, <strong>using a \u201c|\u201d (pipe) to redirect output<\/strong> and <strong>\u201cSelect\u201d to choose specific fields<\/strong>.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Consultamos20informaciC3B3n20sobre20el20bosque20de20AD20DS-800x515-2.jpg\" alt=\"Retrieve information about AD DS forest\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Retrieve information about AD DS forest<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>To get <strong>AD DS domain information<\/strong>, use a similar command to \u201cGet-ADForest\u201d: the <strong>\u201cGet-ADDomain\u201d command<\/strong>, replacing \u201cForest\u201d with \u201cDomain\u201d.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>\u201cGet-ADDomain\u201d provides:<\/p>\r\n<!-- \/wp:paragraph -->\r\n<ul>\r\n<li>Domain name<\/li>\r\n<li>Child domains<\/li>\r\n<li>Parent domain<\/li>\r\n<li>DNS root<\/li>\r\n<li>Domain functional level<\/li>\r\n<li>Forest membership<\/li>\r\n<li>NetBIOS name<\/li>\r\n<li>PDC emulator<\/li>\r\n<li>RID master<\/li>\r\n<li>Infrastructure master<\/li>\r\n<\/ul>\r\n<!-- \/wp:list -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><strong>You can filter<\/strong> as before to query, for example, Domain Level, Domain Name, etc.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Examples:<\/p>\r\n<!-- \/wp:list -->\r\n<ul>\r\n<li>Get-ADDomain | Select Name<\/li>\r\n<li>Get-ADDomain | Select DomainMode<\/li>\r\n<li>Get-ADDomain | Select Name, DomainMode<\/li>\r\n<\/ul>\r\n<!-- \/wp:list -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Consultamos20informaciC3B3n20sobre20el20dominio20de20AD20DS-800x393-2.jpg\" alt=\"Retrieve information about AD DS domain\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Retrieve information about AD DS domain<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>At this point, we also introduce how to <strong>modify output formatting<\/strong> to suit our needs. To adjust the output, we use the <strong>\u201c|\u201d (pipe) to redirect the output<\/strong> into the desired format. These modifications can be applied whenever we want to improve the presentation of retrieved data.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Three of the most commonly used formats are:<\/p>\r\n<!-- \/wp:list -->\r\n<ul>\r\n<li><strong>FT<\/strong>: Table (Format Table)<\/li>\r\n<li><strong>FL<\/strong>: List (Format List)<\/li>\r\n<li><strong>Out-GridView<\/strong>: List (External window format)<\/li>\r\n<\/ul>\r\n<!-- \/wp:list -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>They are used as follows:<\/p>\r\n<!-- \/wp:list -->\r\n<ul>\r\n<li>Get-ADDomain | Select Name, DomainMode | FT<\/li>\r\n<li>Get-ADDomain | Select Name, DomainMode | FL<\/li>\r\n<li>Get-ADDomain | Select Name, DomainMode | Out-GridView<\/li>\r\n<\/ul>\r\n<!-- \/wp:list -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Ejemplos20de20representaciC3B3n20de20la20salida20de20una20consulta20de20PowerShell-800x505-2.jpg\" alt=\"Examples of PowerShell query output formatting\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Examples of PowerShell query output formatting<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>It may also be useful to query <strong>information about Domain Controllers (DC)<\/strong> in our AD DS Server infrastructure.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>To obtain this information, use the <strong>\u201cGet-ADDomainController\u201d command<\/strong>. You can use the <strong>\u201c-Filter\u201d modifier<\/strong> to select specific information or continue <strong>using \u201c| Select\u201d<\/strong> as before.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Consultamos20informaciC3B3n20sobre20los20Controladores20de20Dominio20de20nuestro20AD20DS-800x551-2.jpg\" alt=\"Retrieve information about Domain Controllers in AD DS\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Retrieve information about Domain Controllers in our AD DS<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3><strong>Retrieve User Information:<\/strong><\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>The next step is to retrieve <strong>user information<\/strong>, for example, checking all information and configuration for a specific user.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>There are several ways to do this. The first is running the <strong>\u201cGet-ADUser\u201d command<\/strong> with only the username parameter:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Get-ADUser jioller<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>We can also <strong>specify which information<\/strong> to retrieve using the <strong>\u201c-Properties\u201d modifier<\/strong>, followed by \u201c*\u201d for all properties or by listing specific fields.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Get-ADUser jioller -Properties *<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Get-ADUser jioller -Properties CN, UserPrincipalName, whenCreated, whenChanged<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Consultamos20informaciC3B3n20de20usuarios20dado20de20alta20dentro20de20nuestro20AD20DS-800x574-2.jpg\" alt=\"Retrieve information about users registered in our AD DS\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Retrieve information about users registered in our AD DS<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Another useful query is <strong>retrieving the total number of users in the domain<\/strong>, which can help quickly audit new accounts. The command is simple: query domain users with <strong>\u201cGet-ADUser -Filter *\u201d<\/strong> and count the results with <strong>\u201c().count\u201d<\/strong>.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>(Get-ADUser -Filter *).count<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><strong>NOTE:<\/strong> <em>Always remember that PowerShell is much more than a conventional command line. It works with objects, so options are nearly limitless.<\/em><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Consultamos20el20nC3BAmero20de20usuarios20en20el20dominio-800x120-2.jpg\" alt=\"Check the number of users in the domain\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Check the number of users in the domain<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3><strong>Create and Delete Users:<\/strong><\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><strong>Creating and deleting domain users<\/strong> is common and should be managed efficiently to save time.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Although bulk imports are common in PowerShell, we\u2019ll first see how to create a user manually, then later automate bulk creation.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>To create a user, <strong>set the password first<\/strong> since it cannot be entered directly in the command. Replace &lt;PASSWORD&gt; with your chosen password:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>$userpassword=ConvertTo-SecureString -AsPlainText -Force -String &lt;PASSWORD&gt;<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Then run <strong>\u201cNew-ADUser\u201d<\/strong>:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>New-ADUser -Name jioller2 -AccountPassword $userpassword<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Optionally, you can add parameters like description or enable the account immediately:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>New-ADUser -Name jioller2 -Description &#8220;Second Account of Nacho&#8221; -Enabled $true -AccountPassword $userpassword<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/AC3B1adimos20un20nuevo20usuario20a20mano20y20comprobamos20el20alta-800x353-2.jpg\" alt=\"Add a new user manually and check creation\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Add a new user manually and check creation<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>To delete users manually, use the <strong>\u201cRemove-LocalUser\u201d command<\/strong> followed by the account name:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Remove-LocalUser jioller2<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>We can also filter results, e.g., show users whose names start with \u201cjio\u201d:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Get-ADUser -Filter &#8216;Name -like &#8220;jio*&#8221;&#8216; | Select Name<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Eliminamos20un20usuario20de20AD20DS20con20PowerShell20y20comprobamos20que20todo20ha20ido20bien-800x325-2.jpg\" alt=\"Delete a user from AD DS with PowerShell and check\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Delete a user from AD DS with PowerShell and verify success<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3><strong>Bulk User Creation and Deletion:<\/strong><\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Now let\u2019s see how to <strong>automate user creation<\/strong> using a <strong>\u201c.csv\u201d file<\/strong> and a <strong>small script<\/strong> that reads the file line by line, creating users one by one based on each line&#8217;s information.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>First, create a user and password file with a simple structure where each line represents a user, with fields separated by commas.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>The structure might look like this, with the first line containing the field names and each subsequent line representing a user:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>user,password<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>user01,password01<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>user02,password02<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>\u2026<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Next, import the file into PowerShell so the script can read it:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>$userlist=Import-Csv -Path users.csv<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>This command loads the file using <strong>Import-Csv<\/strong> from the specified <strong>-Path<\/strong>. Make sure the file is in the current directory or provide the full path:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>-Path C:\\Users\\administrator\\Desktop\\users.csv<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Then, execute the script to create users:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>foreach ($i in $userlist)<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>{<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>$userpassword=ConvertTo-SecureString $i.password -AsPlainText -Force<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>New-LocalUser $i.user -Password $userpassword<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>}<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>This script loops through each line and creates a user with <strong>New-LocalUser<\/strong>. The line <strong>$userpassword=ConvertTo-SecureString $i.password -AsPlainText -Force<\/strong> ensures passwords are correctly assigned.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Hacemos20la20importaciC3B3n20masiva20de20usuarios20a20nuestro20AD20DS-800x534-2.jpg\" alt=\"Bulk user import into AD DS\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Bulk user import into our AD DS<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>The script runs in \u201cverbose\u201d mode, showing execution information for each user added. A \u201cTrue\u201d result indicates success.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>To <strong>delete users in bulk<\/strong>, prepare a CSV file containing only the usernames:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>user<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>user01<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>user02<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>\u2026<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Import the file into PowerShell:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>$userlist=Import-Csv -Path deleteusers.csv<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Execute the deletion script:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>foreach ($i in $userlist)<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>{<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Remove-LocalUser $i.user<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>}<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Ejecutamos20el20script20para20eliminar20usuarios20de20manera20masiva-800x180-2.jpg\" alt=\"Bulk user deletion script execution\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Bulk user deletion script execution<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3><strong>Password Changes:<\/strong><\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>An important daily task is <strong>changing or resetting user passwords<\/strong>, especially in organizations with many non-advanced or temporary users.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>There are <strong>two main approaches<\/strong>, depending on whether you know the current password.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><strong>If you know the current password<\/strong>, run the command and enter the current password when prompted:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Set-ADAccountPassword jioller<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><strong>If the current password is unknown<\/strong>, use the <strong>-Reset<\/strong> modifier:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Set-ADAccountPassword jioller -Reset<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Probamos20las20dos20formas20de20cambiar20una20contraseC3B1a-800x230-2.jpg\" alt=\"Testing two ways to change a password\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Testing two ways to change a password<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3><strong>Unlock Accounts:<\/strong><\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>If a user account is locked, you can unlock it using the <strong>\u201cunlock-ADAccount\u201d command<\/strong> followed by the username. Add <strong>-Verbose<\/strong> for task details:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>unlock-ADAccount jioller -Verbose<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>You can also simulate the command using <strong>-WhatIf<\/strong>:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>unlock-ADAccount jioller -WhatIf<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Desbloqueamos20un20usuario20y20hacemos20la20simulaciC3B3n20del20desbloqueo20de20un20usuario-800x152-2.jpg\" alt=\"Unlocking a user and simulating unlock\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Unlocking a user and simulating account unlock<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3><strong>Other User Operations:<\/strong><\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Sometimes you may need to <strong>modify user information<\/strong>, such as adding a description, department, or city. Use <strong>\u201cSet-ADUser\u201d<\/strong> with the username and parameter:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Example: add a description to user \u201cjioller\u201d:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Set-ADUser jioller -Description &#8220;Nacho&#8217;s User&#8221;<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><strong>NOTE:<\/strong> <em>Descriptions should be enclosed in quotes, especially if they contain spaces.<\/em><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Modificamos20y20comprobamos20la20descripciC3B3n20y20ciudad20de20un20usuario-800x359-2.jpg\" alt=\"Modify and verify user description and city\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Modify and verify user description and city<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading {\"level\":3} -->\r\n<h3><strong>Group Management:<\/strong><\/h3>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>We also review some basic operations with AD DS groups. First, retrieve information about a specific group using <strong>\u201cGet-ADGroup\u201d<\/strong>:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Get-ADGroup &#8220;TestGroup&#8221;<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>No quotes are needed around the group name as shown.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Consultamos20informaciC3B3n20sobre20un20grupo20de20AD20DS-800x488-2.jpg\" alt=\"Retrieve information about an AD DS group\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Retrieve information about an AD DS group<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Check group members using <strong>\u201cGet-ADGroupMember\u201d<\/strong>:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Get-ADGroupMember &#8220;TestGroup&#8221;<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Listamos20la20informaciC3B3n20sobre20los20usuarios20pertenecientes20a20un20grupo-800x542-2.jpg\" alt=\"List group members\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>List group members<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Add a user to an existing group using <strong>\u201cAdd-ADGroupMember\u201d<\/strong>:<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Add-ADGroupMember &#8220;TestGroup&#8221; jioller<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Agregamos20un20usuario20a20un20grupo20existente20mediante20comandos20de20PowerShell-800x511-2.jpg\" alt=\"Add a user to an existing group with PowerShell\" \/><\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>Add a user to an existing group with PowerShell<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>We\u2019ll stop here and expand in future articles with more tricks, other object management, GPO management, and Granular Password Policies (PSO).<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:heading -->\r\n<h2><strong>Conclusions and Analysis of AD DS Server<\/strong><\/h2>\r\n<!-- \/wp:heading -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>This is not the ultimate AD DS user management tutorial with PowerShell, but it provides useful commands for basic administration.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>With this, we can <strong>start administering AD DS<\/strong>, focusing on <strong>objects (users and groups)<\/strong>, including user creation, deletion, and basic management.<\/p>\r\n<!-- \/wp:paragraph -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>We recommend exploring PowerShell further, as it has unlimited potential for efficiently managing <strong>Microsoft<\/strong> infrastructure, including <strong>clients<\/strong>, <strong>servers<\/strong>, <strong>services<\/strong>, and some <strong>GNU\/Linux<\/strong> components.<\/p>\r\n<!-- \/wp:paragraph -->","protected":false},"excerpt":{"rendered":"<p>Discover the basic PowerShell commands for managing users on your AD DS Server to speed up and save time in infrastructure management. As we explained in the article 10 PowerShell Commands to Control AD DS Server Objects, \u201csetting up and managing an IT infrastructure is a demanding task requiring the technical team to invest a [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":13702,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[278],"tags":[],"class_list":["post-76820","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud-and-systems"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>AD DS Server and User Management with PowerShell - Jotelulu<\/title>\n<meta name=\"description\" content=\"Discover the basic PowerShell commands for managing users on your AD DS Server and streamlining infrastructure management.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AD DS Server and User Management with PowerShell - Jotelulu\" \/>\n<meta property=\"og:description\" content=\"Discover the basic PowerShell commands for managing users on your AD DS Server and streamlining infrastructure management.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/\" \/>\n<meta property=\"og:site_name\" content=\"Jotelulu\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-10T08:28:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-15T16:17:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/08\/Gestuion-de-usuarios-AD-DS-Server-Powershell-scaled-2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"798\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Juan Ignacio Oller Aznar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Juan Ignacio Oller Aznar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-ad-ds-user-management\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-ad-ds-user-management\\\/\"},\"author\":{\"name\":\"Juan Ignacio Oller Aznar\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#\\\/schema\\\/person\\\/2ae97818cae086c48f108cd74234aca9\"},\"headline\":\"AD DS Server and User Management with PowerShell\",\"datePublished\":\"2022-08-10T08:28:02+00:00\",\"dateModified\":\"2025-12-15T16:17:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-ad-ds-user-management\\\/\"},\"wordCount\":1619,\"image\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-ad-ds-user-management\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Gestuion-de-usuarios-AD-DS-Server-Powershell-scaled-2.jpg\",\"articleSection\":[\"Cloud and Systems\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-ad-ds-user-management\\\/\",\"url\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-ad-ds-user-management\\\/\",\"name\":\"AD DS Server and User Management with PowerShell - Jotelulu\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-ad-ds-user-management\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-ad-ds-user-management\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Gestuion-de-usuarios-AD-DS-Server-Powershell-scaled-2.jpg\",\"datePublished\":\"2022-08-10T08:28:02+00:00\",\"dateModified\":\"2025-12-15T16:17:43+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#\\\/schema\\\/person\\\/2ae97818cae086c48f108cd74234aca9\"},\"description\":\"Discover the basic PowerShell commands for managing users on your AD DS Server and streamlining infrastructure management.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-ad-ds-user-management\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-ad-ds-user-management\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-ad-ds-user-management\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Gestuion-de-usuarios-AD-DS-Server-Powershell-scaled-2.jpg\",\"contentUrl\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Gestuion-de-usuarios-AD-DS-Server-Powershell-scaled-2.jpg\",\"width\":1280,\"height\":798,\"caption\":\"Gesti\u00f3n de usuarios AD DS Server Powershell\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-ad-ds-user-management\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AD DS Server and User Management with PowerShell\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#website\",\"url\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/\",\"name\":\"Jotelulu\",\"description\":\"Cloud Paradise for Tech Companies\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#\\\/schema\\\/person\\\/2ae97818cae086c48f108cd74234aca9\",\"name\":\"Juan Ignacio Oller Aznar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g\",\"caption\":\"Juan Ignacio Oller Aznar\"},\"url\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/author\\\/juanignaciooller\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AD DS Server and User Management with PowerShell - Jotelulu","description":"Discover the basic PowerShell commands for managing users on your AD DS Server and streamlining infrastructure management.","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:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/","og_locale":"en_GB","og_type":"article","og_title":"AD DS Server and User Management with PowerShell - Jotelulu","og_description":"Discover the basic PowerShell commands for managing users on your AD DS Server and streamlining infrastructure management.","og_url":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/","og_site_name":"Jotelulu","article_published_time":"2022-08-10T08:28:02+00:00","article_modified_time":"2025-12-15T16:17:43+00:00","og_image":[{"width":1280,"height":798,"url":"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/08\/Gestuion-de-usuarios-AD-DS-Server-Powershell-scaled-2.jpg","type":"image\/jpeg"}],"author":"Juan Ignacio Oller Aznar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Juan Ignacio Oller Aznar","Estimated reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/#article","isPartOf":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/"},"author":{"name":"Juan Ignacio Oller Aznar","@id":"https:\/\/jotelulu.com\/en-gb\/#\/schema\/person\/2ae97818cae086c48f108cd74234aca9"},"headline":"AD DS Server and User Management with PowerShell","datePublished":"2022-08-10T08:28:02+00:00","dateModified":"2025-12-15T16:17:43+00:00","mainEntityOfPage":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/"},"wordCount":1619,"image":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/#primaryimage"},"thumbnailUrl":"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/08\/Gestuion-de-usuarios-AD-DS-Server-Powershell-scaled-2.jpg","articleSection":["Cloud and Systems"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/","url":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/","name":"AD DS Server and User Management with PowerShell - Jotelulu","isPartOf":{"@id":"https:\/\/jotelulu.com\/en-gb\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/#primaryimage"},"image":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/#primaryimage"},"thumbnailUrl":"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/08\/Gestuion-de-usuarios-AD-DS-Server-Powershell-scaled-2.jpg","datePublished":"2022-08-10T08:28:02+00:00","dateModified":"2025-12-15T16:17:43+00:00","author":{"@id":"https:\/\/jotelulu.com\/en-gb\/#\/schema\/person\/2ae97818cae086c48f108cd74234aca9"},"description":"Discover the basic PowerShell commands for managing users on your AD DS Server and streamlining infrastructure management.","breadcrumb":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/#primaryimage","url":"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/08\/Gestuion-de-usuarios-AD-DS-Server-Powershell-scaled-2.jpg","contentUrl":"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/08\/Gestuion-de-usuarios-AD-DS-Server-Powershell-scaled-2.jpg","width":1280,"height":798,"caption":"Gesti\u00f3n de usuarios AD DS Server Powershell"},{"@type":"BreadcrumbList","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-ad-ds-user-management\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/jotelulu.com\/en-gb\/"},{"@type":"ListItem","position":2,"name":"AD DS Server and User Management with PowerShell"}]},{"@type":"WebSite","@id":"https:\/\/jotelulu.com\/en-gb\/#website","url":"https:\/\/jotelulu.com\/en-gb\/","name":"Jotelulu","description":"Cloud Paradise for Tech Companies","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jotelulu.com\/en-gb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/jotelulu.com\/en-gb\/#\/schema\/person\/2ae97818cae086c48f108cd74234aca9","name":"Juan Ignacio Oller Aznar","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g","caption":"Juan Ignacio Oller Aznar"},"url":"https:\/\/jotelulu.com\/en-gb\/author\/juanignaciooller\/"}]}},"_links":{"self":[{"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/posts\/76820","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/comments?post=76820"}],"version-history":[{"count":4,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/posts\/76820\/revisions"}],"predecessor-version":[{"id":77117,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/posts\/76820\/revisions\/77117"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/media\/13702"}],"wp:attachment":[{"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/media?parent=76820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/categories?post=76820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/tags?post=76820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}