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 [2019/05/25 23:50]
Line 1: Line 1:
-====== Powershell Active Directory ====== 
- 
-**General Information** 
- 
-This page shows neat tricks for Powershell within Active Directory to get useful information (one liners) or make batch changes. 
- 
-**Checklist** 
-  * Powershell CLI installed 
-  * Powershell running as administrator for any modify commands. 
- 
----- 
- 
-==== 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''' 
-  * 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. 
-  * -SearchBase specifies the OU you want to search within, this could be widened to the entire domain if needed. 
-  * -TargetPath specifies where these computers are going to be moved. 
- 
  
  • windows_wiki/powershell_active_directory.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)