How can I see users' Office 365 Password date (date last changed, date it will expire, etc.)?
I know I can see the password dates (date last changed, date it will expire, etc.) for our in-house Active Directory. How do I see this information for Office 365 accounts, either with PowerShell or in any other way? This information is very handy to have at times. I especially need to see when people's passwords were changed.
Thanks,
Jono
powershell office365 password-management
add a comment |
I know I can see the password dates (date last changed, date it will expire, etc.) for our in-house Active Directory. How do I see this information for Office 365 accounts, either with PowerShell or in any other way? This information is very handy to have at times. I especially need to see when people's passwords were changed.
Thanks,
Jono
powershell office365 password-management
add a comment |
I know I can see the password dates (date last changed, date it will expire, etc.) for our in-house Active Directory. How do I see this information for Office 365 accounts, either with PowerShell or in any other way? This information is very handy to have at times. I especially need to see when people's passwords were changed.
Thanks,
Jono
powershell office365 password-management
I know I can see the password dates (date last changed, date it will expire, etc.) for our in-house Active Directory. How do I see this information for Office 365 accounts, either with PowerShell or in any other way? This information is very handy to have at times. I especially need to see when people's passwords were changed.
Thanks,
Jono
powershell office365 password-management
powershell office365 password-management
asked Apr 21 '16 at 19:18
Jono
15129
15129
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
I think I have it, or at least I have enough to figure out what I need.
Get-MsolUser -userprincipalname user@domain.org | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={(Get-Date)-$_.LastPasswordChangeTimeStamp}}
The result looks like this (date and time format will match your computer's):
DisplayName LastPasswordChangeTimestamp PasswordAge
----------- --------------------------- -----------
User, Name 09-Mar-16 5:48p 42.22:34:10.6964630
.
In order to see all users whose passwords are older than 30 days, use this.
Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={(Get-Date)-$_.LastPasswordChangeTimeStamp}} | where {$_.PasswordAge -gt “30”} | sort-object PasswordAge -descending
It will list all of the users with passwords older than 30 days and sort the list by the password age.
I hope this helps others as well.
add a comment |
To properly calculate the Age against UTC time, you can use the ToUniversalTime() method.
Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={((Get-Date).ToUniversalTime())-$_.LastPasswordChangeTimeStamp}} | sort-object PasswordAge -desc
What's so different about this answer that's not already mentioned in the other answer again? Also, if you determine this is indeed not a duplicated answer then consider clarifying and add a little more context to this answer to convey what you are suggesting exactly and why it works, etc. You know, consider adding some reference to this answer supporting what you state and why it is.
– Pimp Juice IT
Aug 16 '17 at 23:53
I see the difference. A more accurate list will result by doing the calculation against UTC since that's the dates and times that PS uses. Without the added expression, there would be a few hours difference as it calculated against the computer time instead of UTC. Is that correct @Toby?
– Jono
Aug 18 '17 at 11:03
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1068269%2fhow-can-i-see-users-office-365-password-date-date-last-changed-date-it-will-e%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I think I have it, or at least I have enough to figure out what I need.
Get-MsolUser -userprincipalname user@domain.org | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={(Get-Date)-$_.LastPasswordChangeTimeStamp}}
The result looks like this (date and time format will match your computer's):
DisplayName LastPasswordChangeTimestamp PasswordAge
----------- --------------------------- -----------
User, Name 09-Mar-16 5:48p 42.22:34:10.6964630
.
In order to see all users whose passwords are older than 30 days, use this.
Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={(Get-Date)-$_.LastPasswordChangeTimeStamp}} | where {$_.PasswordAge -gt “30”} | sort-object PasswordAge -descending
It will list all of the users with passwords older than 30 days and sort the list by the password age.
I hope this helps others as well.
add a comment |
I think I have it, or at least I have enough to figure out what I need.
Get-MsolUser -userprincipalname user@domain.org | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={(Get-Date)-$_.LastPasswordChangeTimeStamp}}
The result looks like this (date and time format will match your computer's):
DisplayName LastPasswordChangeTimestamp PasswordAge
----------- --------------------------- -----------
User, Name 09-Mar-16 5:48p 42.22:34:10.6964630
.
In order to see all users whose passwords are older than 30 days, use this.
Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={(Get-Date)-$_.LastPasswordChangeTimeStamp}} | where {$_.PasswordAge -gt “30”} | sort-object PasswordAge -descending
It will list all of the users with passwords older than 30 days and sort the list by the password age.
I hope this helps others as well.
add a comment |
I think I have it, or at least I have enough to figure out what I need.
Get-MsolUser -userprincipalname user@domain.org | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={(Get-Date)-$_.LastPasswordChangeTimeStamp}}
The result looks like this (date and time format will match your computer's):
DisplayName LastPasswordChangeTimestamp PasswordAge
----------- --------------------------- -----------
User, Name 09-Mar-16 5:48p 42.22:34:10.6964630
.
In order to see all users whose passwords are older than 30 days, use this.
Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={(Get-Date)-$_.LastPasswordChangeTimeStamp}} | where {$_.PasswordAge -gt “30”} | sort-object PasswordAge -descending
It will list all of the users with passwords older than 30 days and sort the list by the password age.
I hope this helps others as well.
I think I have it, or at least I have enough to figure out what I need.
Get-MsolUser -userprincipalname user@domain.org | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={(Get-Date)-$_.LastPasswordChangeTimeStamp}}
The result looks like this (date and time format will match your computer's):
DisplayName LastPasswordChangeTimestamp PasswordAge
----------- --------------------------- -----------
User, Name 09-Mar-16 5:48p 42.22:34:10.6964630
.
In order to see all users whose passwords are older than 30 days, use this.
Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={(Get-Date)-$_.LastPasswordChangeTimeStamp}} | where {$_.PasswordAge -gt “30”} | sort-object PasswordAge -descending
It will list all of the users with passwords older than 30 days and sort the list by the password age.
I hope this helps others as well.
edited Apr 21 '16 at 20:44
answered Apr 21 '16 at 20:26
Jono
15129
15129
add a comment |
add a comment |
To properly calculate the Age against UTC time, you can use the ToUniversalTime() method.
Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={((Get-Date).ToUniversalTime())-$_.LastPasswordChangeTimeStamp}} | sort-object PasswordAge -desc
What's so different about this answer that's not already mentioned in the other answer again? Also, if you determine this is indeed not a duplicated answer then consider clarifying and add a little more context to this answer to convey what you are suggesting exactly and why it works, etc. You know, consider adding some reference to this answer supporting what you state and why it is.
– Pimp Juice IT
Aug 16 '17 at 23:53
I see the difference. A more accurate list will result by doing the calculation against UTC since that's the dates and times that PS uses. Without the added expression, there would be a few hours difference as it calculated against the computer time instead of UTC. Is that correct @Toby?
– Jono
Aug 18 '17 at 11:03
add a comment |
To properly calculate the Age against UTC time, you can use the ToUniversalTime() method.
Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={((Get-Date).ToUniversalTime())-$_.LastPasswordChangeTimeStamp}} | sort-object PasswordAge -desc
What's so different about this answer that's not already mentioned in the other answer again? Also, if you determine this is indeed not a duplicated answer then consider clarifying and add a little more context to this answer to convey what you are suggesting exactly and why it works, etc. You know, consider adding some reference to this answer supporting what you state and why it is.
– Pimp Juice IT
Aug 16 '17 at 23:53
I see the difference. A more accurate list will result by doing the calculation against UTC since that's the dates and times that PS uses. Without the added expression, there would be a few hours difference as it calculated against the computer time instead of UTC. Is that correct @Toby?
– Jono
Aug 18 '17 at 11:03
add a comment |
To properly calculate the Age against UTC time, you can use the ToUniversalTime() method.
Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={((Get-Date).ToUniversalTime())-$_.LastPasswordChangeTimeStamp}} | sort-object PasswordAge -desc
To properly calculate the Age against UTC time, you can use the ToUniversalTime() method.
Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp,@{Name=”PasswordAge”;Expression={((Get-Date).ToUniversalTime())-$_.LastPasswordChangeTimeStamp}} | sort-object PasswordAge -desc
answered Aug 16 '17 at 23:18
Toby
1
1
What's so different about this answer that's not already mentioned in the other answer again? Also, if you determine this is indeed not a duplicated answer then consider clarifying and add a little more context to this answer to convey what you are suggesting exactly and why it works, etc. You know, consider adding some reference to this answer supporting what you state and why it is.
– Pimp Juice IT
Aug 16 '17 at 23:53
I see the difference. A more accurate list will result by doing the calculation against UTC since that's the dates and times that PS uses. Without the added expression, there would be a few hours difference as it calculated against the computer time instead of UTC. Is that correct @Toby?
– Jono
Aug 18 '17 at 11:03
add a comment |
What's so different about this answer that's not already mentioned in the other answer again? Also, if you determine this is indeed not a duplicated answer then consider clarifying and add a little more context to this answer to convey what you are suggesting exactly and why it works, etc. You know, consider adding some reference to this answer supporting what you state and why it is.
– Pimp Juice IT
Aug 16 '17 at 23:53
I see the difference. A more accurate list will result by doing the calculation against UTC since that's the dates and times that PS uses. Without the added expression, there would be a few hours difference as it calculated against the computer time instead of UTC. Is that correct @Toby?
– Jono
Aug 18 '17 at 11:03
What's so different about this answer that's not already mentioned in the other answer again? Also, if you determine this is indeed not a duplicated answer then consider clarifying and add a little more context to this answer to convey what you are suggesting exactly and why it works, etc. You know, consider adding some reference to this answer supporting what you state and why it is.
– Pimp Juice IT
Aug 16 '17 at 23:53
What's so different about this answer that's not already mentioned in the other answer again? Also, if you determine this is indeed not a duplicated answer then consider clarifying and add a little more context to this answer to convey what you are suggesting exactly and why it works, etc. You know, consider adding some reference to this answer supporting what you state and why it is.
– Pimp Juice IT
Aug 16 '17 at 23:53
I see the difference. A more accurate list will result by doing the calculation against UTC since that's the dates and times that PS uses. Without the added expression, there would be a few hours difference as it calculated against the computer time instead of UTC. Is that correct @Toby?
– Jono
Aug 18 '17 at 11:03
I see the difference. A more accurate list will result by doing the calculation against UTC since that's the dates and times that PS uses. Without the added expression, there would be a few hours difference as it calculated against the computer time instead of UTC. Is that correct @Toby?
– Jono
Aug 18 '17 at 11:03
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1068269%2fhow-can-i-see-users-office-365-password-date-date-last-changed-date-it-will-e%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown