Scripting and security

Operating Systems, software development, scripting, PowerShell tips, network and security

Menú principal
  • Categorías
  • Cursos
  • Libro de PowerShell
  • Lo mejor
  • Lo último
  • Proyectos
  • Contactar
Ir al contenido

Check Last Login Time for AD Users

Ofertas y promociones en Videojuegos

PowerShell
1
2
3
4
5
Get-ADUser -Filter 'Name -like "*user*"' | %{
($_ | Get-ADObject -Properties lastLogon).lastlogon
$dt = [DateTime]::FromFileTime(($_ | Get-ADObject -Properties lastLogon).lastlogon)
Write-Host $_ "last logged on at:" $dt
}

 

CATEGORÍAS

PowerShell

ETIQUETAS

Active Directory, AD, Get-ADUser, Jesús Niño Camazón, lastLogon, Properties, Time, User, Write-Host

MÁS

  • Ejercicios de PowerShell: crear un menú
  • Instalación de software libre y propietario (Implantación de sistemas operativos)
  • Ejercicios de PowerShell: realizar operaciones en un equipo remoto
  • Cómo depurar scripts en ISE de Windows PowerShell
  • Instalación de Sistemas Operativos (Sistemas informáticos)
  • Utilizar un filtro LDAP para verificar la hora del último inicio de sesión de los usuarios del Active Directory
685491831 647205379 673207016 662937092 606517533 628406265 672265353 627942968 688438850 636174992 675678815 607375727 627495293 681112221 616594654 638526926 607274649 642763929 602084624 668938927 681396372 687107913 695588115 604595969 606550224 680838103 697203711 607664069 619602721 614968997 693886143 615229744 626084522 691203020 696271843 610966097 651519111 616030973 667603140 698761682 684358439 635138444 655520953 602969979 695532455 670058493 605746503 606296873 601811156 611334555 663256303 646337089 676888732 625688398 693098636 606849960 636292159 616783016 658786517 663304988 614326474 654783223 638283592 631119493 638303146 659552118 636249497 681078251 632212885 685830192