Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

Powershell activie directory 2008 - please help

$
0
0

Hi there

 

I am trying to get a list of all user accounts whose password will expire and move them a new ou called"expired accounts" is that possible ?

 

I have done the first part of the script using powershell which finds all user accounts and the password of expiry which is:

 

Normal 0 false false false EN-AU X-NONE X-NONE

 Get-ADUser -filter {Enabled -eq $True -AND PasswordNeverExpires -eq $False} -properties * | Sort PasswordLastSet | Select Name,PasswordLastSet,PasswordExpired,@{Name="PasswordAge";Expression={(Get-Date)-$_.PasswordLastSet}}

How do i do the next part which is moving them to a new OU?

 

Regards

Adam Madrigal

 


Viewing all articles
Browse latest Browse all 8583

Trending Articles