Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Powershell for lastpasswordset on Enabled accounts only.

$
0
0

I've been able to get a list of all lastpasswordset dates on ALL accounts

Get-ADUser -filter  -properties PasswordLastSet | select name, passwordlastset | export-csv "C:\Users\ME\Desktop\passwords last set.csv" notypeinformation

but when I and (enabled -eq $true)  I get errors 

Get-ADUser -filter * ( enabled -eq $true ) -properties PasswordLastSet | select name, passwordlastset | export-csv "C:\Users\ME\Desktop\EnabledPasswordsLastSet.csv" notypeinformation

Where am I going wrong??? 


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

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