Powershell getting local user account passwordlastset date
[Deleted User]
Senior MemberPosts: 0 ■■□□□□□□□□
in Off-Topic
Hello Fellow IT Pros!
I am working on a project that is requiring me to grab a particular user account and search when the password was last set. This is within powershell. I made one with the Get-ADUser cmdlet, however, I need it for the local user account along with the server hostname in the output. From my understanding, there is no cmdlet to get the local user account for Powershell correct? Is there a way I can get this information using a powershell cmdlet or any other way possible besides net user (username)?
This is what I have but I need a local user account version of this. Can anyone with in depth Powershell knowledge assist?
Get-ADUser -Filter {Name -eq "usernamegoeshere"} -Properties passwordlastset | ft Name,passwordlastset
I am working on a project that is requiring me to grab a particular user account and search when the password was last set. This is within powershell. I made one with the Get-ADUser cmdlet, however, I need it for the local user account along with the server hostname in the output. From my understanding, there is no cmdlet to get the local user account for Powershell correct? Is there a way I can get this information using a powershell cmdlet or any other way possible besides net user (username)?
This is what I have but I need a local user account version of this. Can anyone with in depth Powershell knowledge assist?
Get-ADUser -Filter {Name -eq "usernamegoeshere"} -Properties passwordlastset | ft Name,passwordlastset
Comments
-
gespenstern Member Posts: 1,243 ■■■■■■■■□□Use PowerShell to Create Local User Accounts - Hey, Scripting Guy! Blog - Site Home - TechNet Blogs
no cmdlets, basically
so you may want to fall back to using net user command in your PS script as alternative -
wes allen Member Posts: 540 ■■■■■□□□□□This came up in my twitter feed today:
Bryan Vine: Powershell Script - Get-LocalUsers - Remotely query all local users and details