{"id":76865,"date":"2022-07-15T11:42:53","date_gmt":"2022-07-15T09:42:53","guid":{"rendered":"https:\/\/jotelulu.com\/en-gb\/blog\/"},"modified":"2025-12-12T15:20:49","modified_gmt":"2025-12-12T14:20:49","slug":"powershell-commands-ad-ds-server","status":"publish","type":"post","link":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-commands-ad-ds-server\/","title":{"rendered":"10 PowerShell Commands to Keep Your AD DS Server Objects Under Control"},"content":{"rendered":"\r\n<p>Discover the <strong>ten PowerShell commands that can be really useful to keep your AD DS Server<\/strong> and its objects (<strong>users, computers, groups<\/strong>) under control, saving time in maintenance while not losing any control or scope.<\/p>\r\n\r\n\r\n\r\n<p>Configuring and managing an IT infrastructure is a challenging task where the technical team must invest significant effort, with hundreds of hours dedicated to proper planning and configuration, and hundreds, if not thousands, of hours of maintenance, including tasks of various kinds.<\/p>\r\n\r\n\r\n\r\n<p>Among all these tasks, <strong>managing the Active Directory Domain Services (AD DS) infrastructure<\/strong> should always be one of our <strong>priorities<\/strong>, as it is one of the <strong>most sensitive points<\/strong> within our facilities.<\/p>\r\n\r\n\r\n\r\n<p>Poor security management of this core service can compromise the security of the entire company, which is why we must always keep an eye on the AD DS status.<\/p>\r\n\r\n\r\n\r\n<p>In this article, we will discuss some PowerShell commands that will help us check the status of various elements in our Active Directory to perform this monitoring quickly and efficiently.<\/p>\r\n\r\n\r\n\r\n<p>We should note that these are not all the commands needed for comprehensive infrastructure control, but they allow us to start this task, gradually adding additional commands or even preparing scripts to automate these checks.<\/p>\r\n\r\n\r\n\r\n<p>On the other hand, it should also be clear that in this article we are discussing monitoring, auditing, or a simple check; configurations are discussed, at least in an introductory way, in another article about AD DS.<\/p>\r\n\r\n\r\n\r\n<p><strong>NOTE:<\/strong>\u00a0\u00a0<em>The commands and scripts shown below have been tested on Windows Server 2022 and may not work the same way on other versions of Windows. This is because there are different versions of PowerShell. To identify which version your system runs, you can execute one of the following commands in a Windows PowerShell window: \u201cGet-Host\u201d or \u201c$PSVersionTable\u201d or \u201c$PSVersionTable.PSVersion\u201d.<\/em><\/p>\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><strong>PowerShell Commands to Audit the Security of Your AD DS Server:<\/strong><\/h2>\r\n\r\n\r\n\r\n<p>The first thing to mention is that we will discuss checking various objects within our AD DS infrastructure:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Users.<\/li>\r\n<li>Computers.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Although we will address these AD DS elements, we will likely focus more on users, as they are the most likely to compromise company security.<\/p>\r\n\r\n\r\n\r\n<p><strong>NOTE: <\/strong><em>Before working with PowerShell to manage Active Directory Domain Services (AD DS), we must <strong>import the module<\/strong>. To do this, execute the following command from a PowerShell console with administrator permissions: <strong>\u201cImport-Module ActiveDirectory\u201d<\/strong>.<\/em><\/p>\r\n\r\n\r\n\r\n<p>The queries we will perform are as follows:<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>List users from a specific OU.<\/li>\r\n<li>List expired user accounts.<\/li>\r\n<li>List disabled user accounts.<\/li>\r\n<li>List locked-out user accounts.<\/li>\r\n<li>List inactive users.<\/li>\r\n<li>List users whose passwords never expire.<\/li>\r\n<li>List users with weak passwords.<\/li>\r\n<li>List new users.<\/li>\r\n<li>List inactive domain computers.<\/li>\r\n<li>List disabled computers.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\"><strong>1. List Users from a Specific OU:<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>Here we show how to make a <strong>list of users belonging to a specific Organizational Unit (OU)<\/strong>, so we know which users are in that OU and benefit from the GPOs applied to it.<\/p>\r\n\r\n\r\n\r\n<p>We can execute it in several ways. The most convenient method, allowing for quick queries, is to use a variable to pass the Organizational Unit.<\/p>\r\n\r\n\r\n\r\n<p>For example, suppose we are working with the domain \u201cpruebasnacho.com\u201d and want to know the users in the \u201cZaragoza\u201d OU within \u201cDelegaciones\u201d. The variable would be declared as:<\/p>\r\n\r\n\r\n\r\n<p><strong><em>$OU = &#8216;ou=Zaragoza,ou=Delegaciones,dc=pruebasnacho,dc=com&#8217;<\/em><\/strong><br \/>\u00a0<\/p>\r\n\r\n\r\n\r\n<p>Then we can execute the following command:<\/p>\r\n\r\n\r\n\r\n<p><strong><em>Get-ADUser -Filter * -SearchBase $OU | Select-object Name,DistinguishedName,UserPrincipalName,Enabled,SID | Export-CSV \u201cC:\\Temp\\UsersOU1.CSV\u201d \u2013NoTypeInformation<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Listado20de20usuarios20de20una20OU20en20concreta20de20nuestro20AD20DS20Server20mediante20PowerShell-800x340-2.jpg\" alt=\"List of users from a specific OU in our AD DS Server using PowerShell\" \/><\/p>\r\n\r\n\r\n\r\n<p>List of users from a specific OU in our AD DS Server using PowerShell<\/p>\r\n\r\n\r\n\r\n<p>The second, slightly less \u201cclean\u201d way is to <strong>directly insert the OU data into the command<\/strong>, like this:<\/p>\r\n\r\n\r\n\r\n<p><strong><em>Get-ADUser -Filter * -SearchBase &#8216;ou=Zaragoza,ou=Delegaciones,dc=pruebasnacho,dc=com&#8217; | Select-object Name,DistinguishedName,UserPrincipalName,Enabled,SID | Export-CSV \u201cC:\\Temp\\UsersOU1.CSV\u201d \u2013NoTypeInformation<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p>Next, let&#8217;s explain the various options we are using:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>Get-ADUser<\/strong>: Queries AD DS users.<\/li>\r\n<li><strong>SearchBase<\/strong>: Changes the query scope to show only users of interest, in this case, those in a specific OU.<\/li>\r\n<li><strong>Select-object<\/strong>: Allows selection of which fields to display in the query. To know available fields, it is recommended to run the original command without modifiers: \u201cGet-ADUser -Filter *\u201d.<\/li>\r\n<li><strong>Export-CSV<\/strong>: Exports the information to a CSV file, which can be used by scripts or opened in Excel.<\/li>\r\n<li><strong>NoTypeInformation<\/strong>: Removes the first line of the CSV file, which is informational and can interfere with other scripts.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Ejemplo20de20fichero20CSV20de20salida20tras20la20ejecuciC3B3n20del20comando20de20PowerShell20en20nuestro20AD20DS20Server-800x416-2.jpg\" alt=\"Example of CSV output file after executing PowerShell command in our AD DS Server\" \/><\/p>\r\n\r\n\r\n\r\n<p>Example of CSV output file after executing PowerShell command in our AD DS Server<\/p>\r\n\r\n\r\n\r\n<p>Similarly, we could get all users from all OUs, or in other words, <strong>from the entire domain by removing \u201cSearchBase\u201d<\/strong>, like this:<\/p>\r\n\r\n\r\n\r\n<p><strong><em>Get-ADUser -Filter * | Select-object Name,DistinguishedName,UserPrincipalName,Enabled,SID | Export-CSV \u201cC:\\Temp\\UsersOU1.CSV\u201d \u2013NoTypeInformation<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\"><strong>2. List Expired User Accounts:<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>Another thing to check is which users in the directory <strong>have expired accounts<\/strong>. That is, accounts that should no longer exist because their allowed time has passed.<\/p>\r\n\r\n\r\n\r\n<p>To run this query, we will <strong>use the \u201cSearch-ADAccount\u201d command<\/strong> since this command, unlike \u201cGet-ADUser,\u201d allows querying the account expiration date.<\/p>\r\n\r\n\r\n\r\n<p>The command looks like this:<\/p>\r\n\r\n\r\n\r\n<p><strong><em>Search-ADAccount -AccountExpired | Select-Object Name,DistinguishedName,UserPrincipalName,Enabled,SID,AccountExpirationDate<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p>This case is simpler since we have fewer modifiers and parameters to consider:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>Search-ADAccount<\/strong>: Displays Active Directory accounts that meet certain conditions.<\/li>\r\n<li><strong>AccountExpired<\/strong>: Condition for expired accounts. You can also check manually via the \u201cAccount\u201d tab in a user\u2019s properties under \u201cAccount expires\u201d.<\/li>\r\n<li><strong>Select-Object<\/strong>: Allows selecting which fields to display. It is recommended to run the command without modifiers to see all available fields. In this case, including Name, account, SID, and \u201cAccountExpirationDate\u201d is recommended.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/El20campo20E2809CLa20cuenta20expiraE2809D20dentro20de20la20pestaC3B1a20E2809CCuentaE2809D20de20nuestro20AD20DS20Server-800x437-2.jpg\" alt=\"The 'Account expires' field in the 'Account' tab of our AD DS Server\" \/><\/p>\r\n\r\n\r\n\r\n<p>The &#8216;Account expires&#8217; field in the &#8216;Account&#8217; tab of our AD DS Server<\/p>\r\n\r\n\r\n\r\n<p>We can also add the <strong>\u201cUsersOnly\u201d modifier<\/strong> after expiration to <strong>list only users<\/strong>.<\/p>\r\n\r\n\r\n\r\n<p><br \/>\u00a0<br \/>Usually, I would use \u201cExport-CSV\u201d to save the query results for review of changes, errors, etc. In this case, and for some following examples, I won\u2019t use it so that we can display the execution directly in screenshots.<\/p>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Listado20de20cuentas20de20usuario20expiradas20en20nuestro20AD20DS20Server20con20PowerShell-800x341-2.jpg\" alt=\"List of expired user accounts in our AD DS Server using PowerShell\" \/><\/p>\r\n\r\n\r\n\r\n<p>List of expired user accounts in our AD DS Server using PowerShell<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\"><strong>3. List Disabled User Accounts:<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>Another point to audit is the <strong>disabled accounts<\/strong>. These accounts are typically users who have left the company, were dismissed, or are no longer used. They are generally not dangerous since they prevent login, but should be removed for added security.<\/p>\r\n\r\n\r\n\r\n<p>Disabled accounts <strong>are listed using the \u201cGet-ADUser\u201d command<\/strong> by checking that the <strong>\u201cEnabled\u201d property<\/strong> is set to false, requiring no additional parameters, as shown here:<\/p>\r\n\r\n\r\n\r\n<p><strong><em>Get-ADUser -Filter {(Enabled -eq $False)} | Select-Object\u00a0 Name,DistinguishedName,UserPrincipalName,Enabled,SID,LastLogon<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p>We only need to use \u201cSelect-Object\u201d to choose the fields to display. Again, to see available fields, run the original command without modifiers. Including \u201cLastLogon\u201d can also be helpful to see the last login time.<\/p>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Listado20de20cuentas20de20usuario20deshabilitadas20en20nuestro20AD20DS20Server20con20PowerShell-800x210-2.jpg\" alt=\"List of disabled user accounts in our AD DS Server using PowerShell\" \/><\/p>\r\n\r\n\r\n\r\n<p>List of disabled user accounts in our AD DS Server using PowerShell<\/p>\r\n\r\n\r\n\r\n<p>We could also manually check a <strong>specific user<\/strong> using the <strong>Get-ADUser command<\/strong>:<\/p>\r\n\r\n\r\n\r\n<p><br \/><strong><em>Get-ADUser &lt;username&gt; | select Name,DistinguishedName,UserPrincipalName,Enabled,SID,LastLogon<\/em><\/strong><br \/>\u00a0<\/p>\r\n\r\n\r\n\r\n<p><br \/>Where <strong>&lt;username&gt;<\/strong> is the user to check.<\/p>\r\n\r\n\r\n\r\n<p><br \/>\u00a0<br \/>For example, to check user \u201cSandra\u201d, run:<\/p>\r\n\r\n\r\n\r\n<p><br \/><strong><em>Get-ADUser Sandra | select Name,DistinguishedName,UserPrincipalName,Enabled,SID,LastLogon<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Comprobando20si20una20cuenta20de20usuario20de20nuestro20AD20DS20Server20estC3A120deshabilitadas-800x299-2.jpg\" alt=\"Checking if a user account in our AD DS Server is disabled\" \/><\/p>\r\n\r\n\r\n\r\n<p>Checking if a user account in our AD DS Server is disabled<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\"><strong>4. List Locked User Accounts:<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>Another point to check is <strong>accounts locked due to exceeding a certain number of failed login attempts<\/strong>. This can be an <strong>indicator<\/strong> of malicious users trying to <strong>gain access by guessing passwords<\/strong>, although it is often just users who repeatedly mistype or forget their password.<\/p>\r\n\r\n\r\n\r\n<p>The command is straightforward and, again, <strong>uses \u201cSearch-ADAccount\u201d<\/strong>.<\/p>\r\n\r\n\r\n\r\n<p><strong><em>Search-ADAccount -LockedOut | Select-Object Name,DistinguishedName,UserPrincipalName,Enabled,SID,LastLogon<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p>The following modifiers can be used:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>LockedOut<\/strong>: selects only accounts that are locked.<\/li>\r\n<li><strong>Export-CSV<\/strong>: export to a file for later processing.<\/li>\r\n<li><strong>UsersOnly<\/strong>: display only locked users.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Listado20de20cuentas20de20usuario20bloqueadas20en20nuestro20AD20DS20Server20con20PowerShell-800x208-2.jpg\" alt=\"List of locked user accounts in our AD DS Server using PowerShell\" \/><\/p>\r\n\r\n\r\n\r\n<p>List of locked user accounts in our AD DS Server using PowerShell<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\"><strong>5. List Inactive Users:<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>In this case, we look for <strong>users who haven\u2019t logged in for a period of time<\/strong>, for example 90 days, which are considered <strong>inactive users<\/strong> in the domain.<\/p>\r\n\r\n\r\n\r\n<p>The query uses the <strong>\u201cSearch-ADAccount\u201d command<\/strong>:<\/p>\r\n\r\n\r\n\r\n<p><strong><em>Search-ADAccount \u2013AccountInActive \u2013TimeSpan 90:00:00:00 | Select-Object Name,DistinguishedName,SID,LastLogon<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p>Where:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>AccountInActive<\/strong>: lists inactive accounts.<\/li>\r\n<li><strong>TimeSpan<\/strong>: period after which a user is considered inactive; in this case 90 days \u201c90:00:00:00\u201d.<\/li>\r\n<li><strong>Select-Object<\/strong>: filters the properties to display. Here, Name, DistinguishedName, SID, and LastLogon are shown.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Ejecutamos20el20comando20para20buscar20usuarios20inactivos20en20nuestro20AD20DS20Server-800x343-2.jpg\" alt=\"Running the command to find inactive users in our AD DS Server\" \/><\/p>\r\n\r\n\r\n\r\n<p>Running the command to find inactive users in our AD DS Server<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\"><strong>6. List Users Whose Password Never Expires:<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>Another key point is monitoring <strong>users whose passwords never expire<\/strong>. The <strong>password expiration<\/strong> mechanism <strong>keeps passwords secure<\/strong> through rotation, preventing users from reusing the same passwords across systems, websites, banks, etc.<\/p>\r\n\r\n\r\n\r\n<p>The <strong>only accounts<\/strong> that should have <strong>permanent passwords<\/strong> are <strong>service accounts<\/strong>, as expiration could stop the services they run.<\/p>\r\n\r\n\r\n\r\n<p>To locate other users, we can <strong>use the \u201cget-aduser\u201d command<\/strong> with parameters filtering for users whose password does not expire:<\/p>\r\n\r\n\r\n\r\n<p><br \/><strong><em>get-aduser -filter * -properties PasswordNeverExpires | where {<\/em><\/strong><strong> via the \u201cPasswordNeverExpires\u201d option<\/strong><br \/><strong><em>$_.passwordNeverExpires -eq &#8220;true&#8221; } |\u00a0 Select-Object Name,DistinguishedName,UserPrincipalName,Enabled,SID<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p>As in previous examples, we display properties \u201cName,DistinguishedName,UserPrincipalName,Enabled,SID\u201d, but any other can be added. To see all options, run \u201cget-aduser -filter *\u201d.<\/p>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Listando20cuentas20de20usuario20de20nuestro20AD20DS20Server20que20nunca20caducan-800x417-2.jpg\" alt=\"Listing user accounts in our AD DS Server that never expire\" \/><\/p>\r\n\r\n\r\n\r\n<p>Listing user accounts in our AD DS Server that never expire<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\"><strong>7. List Users with Weak Passwords:<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>One of the biggest mistakes when managing users is allowing <strong>users with weak passwords<\/strong>, as they are <strong>vulnerable to brute-force attacks<\/strong>, dictionary attacks, etc.<\/p>\r\n\r\n\r\n\r\n<p>This is solved with <strong>strong password policies<\/strong>. In newer versions of Windows Server, these policies are usually enabled by default. For more on Microsoft password policies, see the following <a href=\"https:\/\/docs.microsoft.com\/es-es\/windows\/security\/threat-protection\/security-policy-settings\/password-policy\" target=\"_blank\" rel=\"noreferrer noopener\">link<\/a>.<\/p>\r\n\r\n\r\n\r\n<p>However, even with enforced policies, weak passwords may exist for special cases, like executives or privileged users, where exceptions allow overly simple passwords\u2014a practice that should be minimized.<\/p>\r\n\r\n\r\n\r\n<p>To search for weak passwords, first <strong>import the \u201cDSInternals\u201d module<\/strong>:<\/p>\r\n\r\n\r\n\r\n<p><br \/><em><strong>Install-Module DSInternals<\/strong><\/em><\/p>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/importamos20el20mC3B3dulo20DSInternals20de20PowerShell-800x368-2.jpg\" alt=\"Importing the DSInternals PowerShell module and accepting options\" \/><\/p>\r\n\r\n\r\n\r\n<p>Importing the DSInternals PowerShell module and accepting options<\/p>\r\n\r\n\r\n\r\n<p>Next, load a <strong>password dictionary file<\/strong>. You can use a downloaded one or create your own. If downloading, include names like company or city for relevance.<\/p>\r\n\r\n\r\n\r\n<p><strong><em>$Passwords = &#8220;C:\\Users\\Administrator\\Desktop\\passwords.txt&#8221;<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p>Then execute the query command:<\/p>\r\n\r\n\r\n\r\n<p><strong><em>Get-ADReplAccount -All -Server \u2018&lt;SERVER_WITH_FQDN&gt;\u2019 | Test-PasswordQuality -WeakPasswordsFile $Passwords -IncludeDisabledAccounts<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p>Where:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>&lt;SERVER_WITH_FQDN&gt;<\/strong>: replace with the AD DS server name (DC) with its FQDN, e.g., &#8216;WIN-Q28KD6B1DN2.pruebasnacho.com&#8217;.<\/li>\r\n<li><strong>Test-PasswordQuality<\/strong>: tests password quality.<\/li>\r\n<li><strong>WeakPasswordsFile<\/strong>: uses the text file loaded previously via the $Passwords variable.<\/li>\r\n<li><strong>IncludeDisabledAccounts<\/strong>: includes disabled accounts for a more complete check.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Example:<\/p>\r\n\r\n\r\n\r\n<p><strong><em>Get-ADReplAccount -All -Server &#8216;WIN-Q28KD6B1DN2.pruebasnacho.com&#8217; | Test-PasswordQuality -WeakPasswordsFile $Passwords -IncludeDisabledAccounts<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Ejecutamos20la20consulta20de20PowerShell20para20encontrar20las20contraseC3B1as20dC3A9biles20en20AD20DS20Server-800x340-2.jpg\" alt=\"Running the PowerShell query to find weak passwords in AD DS Server\" \/><\/p>\r\n\r\n\r\n\r\n<p>Running the PowerShell query to find weak passwords in AD DS Server<\/p>\r\n\r\n\r\n\r\n<p>This example uses the script by <a href=\"https:\/\/4sysops.com\/archives\/find-weak-active-directory-passwords-with-powershell\/\">Adam Bertram<\/a>.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\"><strong>8. PowerShell Commands to List New Users:<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>When auditing Active Directory, we should also monitor <strong>newly created users<\/strong> and track when a new account is created.<\/p>\r\n\r\n\r\n\r\n<p>For example, <strong>weekly listing of new AD DS users<\/strong> can be compared with IT department records to detect unauthorized account creation.<\/p>\r\n\r\n\r\n\r\n<p>To search, first <strong>create a variable for the user creation timeframe<\/strong>. For instance, for users created in the last 7 days, use \u201c7\u201d with \u201cAddDays\u201d.<\/p>\r\n\r\n\r\n\r\n<p>Then use <strong>\u201cGet-ADUser\u201d<\/strong> with the <strong>\u201cwhenCreated\u201d parameter<\/strong> to compare against the variable. If the date is greater (-ge), the account is displayed with selected properties.<\/p>\r\n\r\n\r\n\r\n<p>Example for one day:<\/p>\r\n\r\n\r\n\r\n<p><strong><em>$Date = ((Get-Date).AddDays(-1)).Date<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong><em>Get-ADUser -Filter {whenCreated -ge $Date} -Properties *| Select-Object Name,DistinguishedName,SID,Enabled,whenCreated<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Listar20nuevos20usuarios20en20nuestro20AD20DS20Server20mediante20PowerShell-800x366-2.jpg\" alt=\"Listing new users in our AD DS Server using PowerShell\" \/><\/p>\r\n\r\n\r\n\r\n<p>Listing new users in our AD DS Server using PowerShell<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\"><strong>9. List Inactive Domain Computers:<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>Regarding <strong>domain-joined computers<\/strong>, we can query to <strong>extract and list them<\/strong> for inventory or further processing.<\/p>\r\n\r\n\r\n\r\n<p>The query uses <strong>\u201cGet-ADComputer\u201d<\/strong> to list all computers and servers, filtering relevant properties.<\/p>\r\n\r\n\r\n\r\n<p>Example:<\/p>\r\n\r\n\r\n\r\n<p><strong><em>Get-ADComputer -Filter * -Property * | Select-Object Name,DNSHostName,OperatingSystem,ipv4Address<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p>We chose to display the following properties:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>Name<\/strong>: Computer name as shown in \u201cMy PC\u201d.<\/li>\r\n<li><strong>DNSHostName<\/strong>: Fully Qualified Domain Name (FQDN).<\/li>\r\n<li><strong>OperatingSystem<\/strong>: OS as shown in the object properties.<\/li>\r\n<li><strong>ipv4Address<\/strong>: IPv4 address assigned to the computer.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Listando20las20mC3A1quinas20dadas20de20alta20dentro20de20nuestro20AD20DS20Server20mediante20PowerShell-800x416-2.jpg\" alt=\"Listing domain-joined computers in AD DS Server using PowerShell\" \/><\/p>\r\n\r\n\r\n\r\n<p>Listing domain-joined computers in AD DS Server using PowerShell<\/p>\r\n\r\n\r\n\r\n<p>We should also <strong>remove inactive computers from the domain<\/strong>, often old PCs not properly decommissioned.<\/p>\r\n\r\n\r\n\r\n<p>These machines may leave the company without being wiped, potentially creating security risks.<\/p>\r\n\r\n\r\n\r\n<p>To detect them, <strong>use \u201cGet-ADComputer\u201d<\/strong> with a variable for time, similar to the new users query.<\/p>\r\n\r\n\r\n\r\n<p>Example for 180 days:<\/p>\r\n\r\n\r\n\r\n<p><strong><em>$time = (Get-Date).Adddays(-(180))<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong><em>Get-ADComputer -Filter {LastLogonTimeStamp -lt $time} -Properties Name ,LastLogonDate<\/em><\/strong><\/p>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Listando20las20mC3A1quinas20inactivas20dentro20de20nuestro20AD20DS20Server20mediante20PowerShell-800x368-2.jpg\" alt=\"Listing inactive computers in AD DS Server using PowerShell\" \/><\/p>\r\n\r\n\r\n\r\n<p>Listing inactive computers in AD DS Server using PowerShell<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\"><strong>10. List Disabled Computers:<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>We should also track <strong>disabled computers<\/strong>, as these should ideally be removed.<\/p>\r\n\r\n\r\n\r\n<p>Query using <strong>\u201cGet-ADComputer\u201d<\/strong> filtering where \u201cEnabled\u201d is false:<\/p>\r\n\r\n\r\n\r\n<p><strong>Get-ADComputer -Filter {(Enabled -eq $False)} | Select-Object Name<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Select properties with \u201cSelect-Object\u201d; here only the computer name is shown.<\/p>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Listando20las20mC3A1quinas20deshabilitas20dentro%20de20nuestro20AD20DS20Server20mediante20PowerShell-800x192-2.jpg\" alt=\"Listing disabled computers in AD DS Server using PowerShell\" \/><\/p>\r\n\r\n\r\n\r\n<p>Listing disabled computers in AD DS Server using PowerShell<\/p>\r\n\r\n\r\n\r\n<p><strong>NOTE:<\/strong> <em>The number of days before a computer is considered inactive should be carefully considered, depending on company policies.<\/em><\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><strong>Conclusions on 10 PowerShell Commands to Control AD DS Objects<\/strong><\/h2>\r\n\r\n\r\n\r\n<p>As the reader may notice, this is not an exhaustive list. We selected the 10 first commands that extract key security information for users and computers.<\/p>\r\n\r\n\r\n\r\n<p>Other areas like Domain Controller health, AD DS event logs, DC synchronization, and time service synchronization are covered in other articles, to keep this guide concise and actionable.<\/p>\r\n\r\n\r\n\r\n<p>Using these commands, <strong>we can start controlling AD DS objects (users and computers)<\/strong>, potentially integrating them as <strong>scheduled tasks<\/strong> in maintenance routines, ideally running them monthly to track changes or anomalies.<\/p>\r\n\r\n\r\n\r\n<p>As always, we <strong>recommend exploring PowerShell<\/strong> due to its unlimited potential to <strong>efficiently manage Microsoft infrastructure<\/strong>, including <strong>clients<\/strong>, <strong>servers<\/strong>, <strong>services<\/strong>, and certain <strong>GNU\/Linux<\/strong> components.<\/p>\r\n\r\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Discover the ten PowerShell commands that can be really useful to keep your AD DS Server and its objects (users, computers, groups) under control, saving time in maintenance while not losing any control or scope. Configuring and managing an IT infrastructure is a challenging task where the technical team must invest significant effort, with hundreds [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":76868,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[278],"tags":[],"class_list":["post-76865","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>10 Essential PowerShell Commands to Manage Your AD DS Server<\/title>\n<meta name=\"description\" content=\"Discover 10 powerful PowerShell commands to efficiently monitor and manage your Active Directory Domain Services (AD DS) users and computers, enhancing security and saving time.\" \/>\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-commands-ad-ds-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"10 Essential PowerShell Commands to Manage Your AD DS Server\" \/>\n<meta property=\"og:description\" content=\"Discover 10 powerful PowerShell commands to efficiently monitor and manage your Active Directory Domain Services (AD DS) users and computers, enhancing security and saving time.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-commands-ad-ds-server\/\" \/>\n<meta property=\"og:site_name\" content=\"Jotelulu\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-15T09:42:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-12T14:20:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2025\/12\/10-comando-de-powershell-para-controlar-los-objetos-de-tu-ad-ds-server_v2-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"721\" \/>\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=\"16 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-commands-ad-ds-server\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-commands-ad-ds-server\\\/\"},\"author\":{\"name\":\"Juan Ignacio Oller Aznar\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#\\\/schema\\\/person\\\/2ae97818cae086c48f108cd74234aca9\"},\"headline\":\"10 PowerShell Commands to Keep Your AD DS Server Objects Under Control\",\"datePublished\":\"2022-07-15T09:42:53+00:00\",\"dateModified\":\"2025-12-12T14:20:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-commands-ad-ds-server\\\/\"},\"wordCount\":2223,\"image\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-commands-ad-ds-server\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/10-comando-de-powershell-para-controlar-los-objetos-de-tu-ad-ds-server_v2-1.jpg\",\"articleSection\":[\"Cloud and Systems\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-commands-ad-ds-server\\\/\",\"url\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-commands-ad-ds-server\\\/\",\"name\":\"10 Essential PowerShell Commands to Manage Your AD DS Server\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-commands-ad-ds-server\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-commands-ad-ds-server\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/10-comando-de-powershell-para-controlar-los-objetos-de-tu-ad-ds-server_v2-1.jpg\",\"datePublished\":\"2022-07-15T09:42:53+00:00\",\"dateModified\":\"2025-12-12T14:20:49+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#\\\/schema\\\/person\\\/2ae97818cae086c48f108cd74234aca9\"},\"description\":\"Discover 10 powerful PowerShell commands to efficiently monitor and manage your Active Directory Domain Services (AD DS) users and computers, enhancing security and saving time.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-commands-ad-ds-server\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-commands-ad-ds-server\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-commands-ad-ds-server\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/10-comando-de-powershell-para-controlar-los-objetos-de-tu-ad-ds-server_v2-1.jpg\",\"contentUrl\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/10-comando-de-powershell-para-controlar-los-objetos-de-tu-ad-ds-server_v2-1.jpg\",\"width\":1280,\"height\":721},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/powershell-commands-ad-ds-server\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"10 PowerShell Commands to Keep Your AD DS Server Objects Under Control\"}]},{\"@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":"10 Essential PowerShell Commands to Manage Your AD DS Server","description":"Discover 10 powerful PowerShell commands to efficiently monitor and manage your Active Directory Domain Services (AD DS) users and computers, enhancing security and saving time.","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-commands-ad-ds-server\/","og_locale":"en_GB","og_type":"article","og_title":"10 Essential PowerShell Commands to Manage Your AD DS Server","og_description":"Discover 10 powerful PowerShell commands to efficiently monitor and manage your Active Directory Domain Services (AD DS) users and computers, enhancing security and saving time.","og_url":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-commands-ad-ds-server\/","og_site_name":"Jotelulu","article_published_time":"2022-07-15T09:42:53+00:00","article_modified_time":"2025-12-12T14:20:49+00:00","og_image":[{"width":1280,"height":721,"url":"https:\/\/jotelulu.com\/wp-content\/uploads\/2025\/12\/10-comando-de-powershell-para-controlar-los-objetos-de-tu-ad-ds-server_v2-1.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":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-commands-ad-ds-server\/#article","isPartOf":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-commands-ad-ds-server\/"},"author":{"name":"Juan Ignacio Oller Aznar","@id":"https:\/\/jotelulu.com\/en-gb\/#\/schema\/person\/2ae97818cae086c48f108cd74234aca9"},"headline":"10 PowerShell Commands to Keep Your AD DS Server Objects Under Control","datePublished":"2022-07-15T09:42:53+00:00","dateModified":"2025-12-12T14:20:49+00:00","mainEntityOfPage":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-commands-ad-ds-server\/"},"wordCount":2223,"image":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-commands-ad-ds-server\/#primaryimage"},"thumbnailUrl":"https:\/\/jotelulu.com\/wp-content\/uploads\/2025\/12\/10-comando-de-powershell-para-controlar-los-objetos-de-tu-ad-ds-server_v2-1.jpg","articleSection":["Cloud and Systems"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-commands-ad-ds-server\/","url":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-commands-ad-ds-server\/","name":"10 Essential PowerShell Commands to Manage Your AD DS Server","isPartOf":{"@id":"https:\/\/jotelulu.com\/en-gb\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-commands-ad-ds-server\/#primaryimage"},"image":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-commands-ad-ds-server\/#primaryimage"},"thumbnailUrl":"https:\/\/jotelulu.com\/wp-content\/uploads\/2025\/12\/10-comando-de-powershell-para-controlar-los-objetos-de-tu-ad-ds-server_v2-1.jpg","datePublished":"2022-07-15T09:42:53+00:00","dateModified":"2025-12-12T14:20:49+00:00","author":{"@id":"https:\/\/jotelulu.com\/en-gb\/#\/schema\/person\/2ae97818cae086c48f108cd74234aca9"},"description":"Discover 10 powerful PowerShell commands to efficiently monitor and manage your Active Directory Domain Services (AD DS) users and computers, enhancing security and saving time.","breadcrumb":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-commands-ad-ds-server\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jotelulu.com\/en-gb\/blog\/powershell-commands-ad-ds-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-commands-ad-ds-server\/#primaryimage","url":"https:\/\/jotelulu.com\/wp-content\/uploads\/2025\/12\/10-comando-de-powershell-para-controlar-los-objetos-de-tu-ad-ds-server_v2-1.jpg","contentUrl":"https:\/\/jotelulu.com\/wp-content\/uploads\/2025\/12\/10-comando-de-powershell-para-controlar-los-objetos-de-tu-ad-ds-server_v2-1.jpg","width":1280,"height":721},{"@type":"BreadcrumbList","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/powershell-commands-ad-ds-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/jotelulu.com\/en-gb\/"},{"@type":"ListItem","position":2,"name":"10 PowerShell Commands to Keep Your AD DS Server Objects Under Control"}]},{"@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\/76865","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=76865"}],"version-history":[{"count":6,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/posts\/76865\/revisions"}],"predecessor-version":[{"id":77056,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/posts\/76865\/revisions\/77056"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/media\/76868"}],"wp:attachment":[{"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/media?parent=76865"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/categories?post=76865"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/tags?post=76865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}