File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ title : " This is just a test"
3+ excerpt : " Testing things out"
4+ categories :
5+ - Test
6+ tags :
7+ - PowerShell
8+ - Arrays
9+ - PowerShell Basics
10+ - HowTo
11+
12+ toc : false
13+ ---
14+
15+ # Convert-ADExpirationDate
16+
17+ ## SYNOPSIS
18+ Cmdlet is used to convert a user expiration date to human readable format.
19+
20+ ## SYNTAX
21+
22+ ### Set 1
23+ ```
24+ Convert-ADExpirationDate [-ExpirationDate] <Int64>
25+ ```
26+
27+ ## DESCRIPTION
28+ Cmdlet is used to convert internal AD expiration date format to human readable format returning a DateTime object.
29+
30+ ## EXAMPLES
31+
32+ ### EXAMPLE 1
33+ Passing a valid expiration date
34+ ``` powershell
35+ Convert-AdExpirationDate -ExpirationDate 132566400000000000
36+
37+ # Output
38+ Monday, February 1, 2021 9:00:00 AM
39+ ```
40+
41+ Values can be passed both as System.Long or Strings as PowerShell internally will cast to the correct data type.
42+
43+ ### EXAMPLE 2
44+ Passing a value of 0 or 9223372036854775807 will return nothing
45+ ``` powershell
46+ Convert-ADExpirationDate -ExpirationDate 9223372036854775807
47+
48+ WARNING: Account has no expiration date
49+ ```
50+
51+ A warning message about user having no expiration date will be displayed as both 0 and 9223372036854775807 translates to no expiration.
52+
53+ ## PARAMETERS
54+
55+ ### ExpirationDate
56+
57+
58+ ``` yaml
59+ Type : Int64
60+ Parameter Sets : Set 1
61+ Aliases :
62+
63+ Required : true
64+ Position : 0
65+ Default Value :
66+ Pipeline Input : True (ByValue)
67+ ` ` `
68+
69+ ## INPUTS
70+
71+ ### System.Int64
72+
73+
74+ ## OUTPUTS
75+
76+ ### System.DateTime
77+
78+
79+ ## NOTES
80+
81+ ## RELATED LINKS
82+
83+ [Online Version:](https://PsCustomObject.github.io)
84+
85+
86+ *Generated by: PowerShell HelpWriter 2020 v2.3.47*
You can’t perform that action at this time.
0 commit comments