Get-ADDefaultDomainPasswordPolicy, howto get in hours/days?

Hi,

How to get Get-ADDefaultDomainPasswordPolicy stats in hours days?
Now this is:

LockoutDuration             : 00:90:00
LockoutObservationWindow    : 00:60:00
LockoutThreshold            :  10
MaxPasswordAge              : 40.00:00:00
MinPasswordAge              : 00:00:00

J.
janhoedtAsked:
Who is Participating?
 
oBdAConnect With a Mentor Commented:
For an overview of the duration properties in different units, you can use this:
$pp = Get-ADDefaultDomainPasswordPolicy
$pp.psobject.Properties |
	Where-Object {$_.TypeNameOfValue -like '*System.Timespan*'} |
	ForEach-Object {$Name = $_.Name; $_.Value | Select-Object @{n='Name'; e={$Name}}, Total*} |
	Format-Table -AutoSize

Open in new window

0
 
oBdACommented:
"stats in hours days"? Sorry?
These values are all TimeSpan objects, so they contain all kind of time information out of the box.
Try, for example:
$pp = Get-ADDefaultDomainPasswordPolicy
$pp.LockoutDuration

Open in new window

What is it exactly you need?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.