windows_wiki:powershell_active_directory

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

windows_wiki:powershell_active_directory [2018/07/18 19:30]
psycardis created
windows_wiki:powershell_active_directory [2018/07/18 19:30]
psycardis
Line 12: Line 12:
  
 ==== Move inactive computers to a new OU for confirmation and deletion from AD. ==== ==== Move inactive computers to a new OU for confirmation and deletion from AD. ====
-  * ''get-adcomputer -SearchBase 'ou=Workstations,dc=contoso,dc=com' -filter "Passwordlastset -lt '1/1/2018'" -properties * | Move-ADObject -TargetPath 'ou=OLD,ou=Workstations,dc=contoso,dc=com'''+  * ''get-adcomputer -SearchBase 'ou=Workstations,dc=contoso,dc=com' -filter "Passwordlastset -lt '1/1/2018'" -properties * | Move-ADObject -TargetPath 'ou=OLD,ou=Workstations,dc=contoso,dc=com' ''
   * Moves all computers who have not connected to the domain since 1/1/2018 to the OLD OU.   * Moves all computers who have not connected to the domain since 1/1/2018 to the OLD OU.
   * Computers connected to the domain reset their passwords every 30 days.   * Computers connected to the domain reset their passwords every 30 days.
  • windows_wiki/powershell_active_directory.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)