contar_equipos_por_ou_en_active_director
Differences
This shows you the differences between two versions of the page.
| contar_equipos_por_ou_en_active_director [2025/10/03 14:17] – created oso | contar_equipos_por_ou_en_active_director [2025/10/03 19:45] (current) – [Explicación] oso | ||
|---|---|---|---|
| Line 32: | Line 32: | ||
| ===== Explicación ===== | ===== Explicación ===== | ||
| - | * **Get-ADComputer** con `-SearchBase` limita la búsqueda a la OU deseada. | + | * **Get-ADComputer** con '' |
| * **DistinguishedName** contiene toda la ruta en AD (CN, OU, DC). | * **DistinguishedName** contiene toda la ruta en AD (CN, OU, DC). | ||
| - | * Al hacer `-split ',' | + | * Al hacer '' |
| - | * `Select-Object -First 1` toma la primera OU debajo de la raíz buscada. | + | * '' |
| * **Group-Object** agrupa por esa OU y cuenta objetos. | * **Group-Object** agrupa por esa OU y cuenta objetos. | ||
contar_equipos_por_ou_en_active_director.txt · Last modified: 2025/10/03 19:45 by oso
