Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Get-Aduser(Inactive accounts)

$
0
0

I am able to use the script below just fine and save it to a .csv file. My issue is the distinguished name part, the script adds just part of the distinguished name and cuts off the rest with 3 dots (...). I need this to show the distinguished name in its entirety, any suggestions?

get-aduser -SearchBase "OU=User_Accounts,DC=DEVLAB,DC=LOCAL" -filter * -Properties lastlogondate, passwordlastset | Where-Object {($_.lastlogondate -le $90days -or $_.lastlogondate -notlike "*")-AND ($_.passwordlastset -le $90days) -AND ($_.Enabled -eq $True)} | Select-Object name,distinguishedname,lastlogondate,passwordlastset


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>