This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Agregar el modulo de Active Directory. | |
import-module activedirectory | |
$Final=@() | |
## Apunta a la ruta donde esta el archivo | |
$ruta="c:\datos" | |
## Apunta al archivo | |
$archivo="lista de usuarios.txt" | |
## Obtiene una lista de todos los usuarios que esten habiliados. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function show-progressbar([int]$actual,[int]$completo,[string]$status,[string]$Activity) | |
{ | |
$porcentaje=($actual/$completo)*100 | |
if (!$status){ | |
$status="Buscando datos $actual de $completo" | |
} | |
if (!$Activity){ | |
$Activity="Obteniendo Resultados" | |
} | |
Write-Progress -Activity $Activity -status $status -percentComplete $porcentaje |
NewerOlder