Advertisement
vinissh

AD.ps1

Jan 26th, 2021
846
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (Get-Command -Module ActiveDirectory).Count
  2. Get-Command new-ad*
  3. Get-Command Get-ad*
  4.  
  5.  
  6.  
  7.  
  8. new-AdUser Curso.POSH
  9. Get-AdUser my.user -Properties LastLogonDate
  10. Get-ADUser -Filter * | where {$_.enabled -eq $false }
  11. Get-ADUser -Filter * -Properties * | Export-Csv c:\listauser.csv
  12. Get-ADUser -Filter * -Properties * | select -Property DisplayName
  13.  
  14. Import-Csv C:\listauser.csv
  15.  
  16.  
  17. #Removendo
  18. Get-ADUser Curso.POSH | Remove-ADUSer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement