Get Local Account Password Expiration
» by JeffHicks on Tue 16 Mar 2010 · No replies
Last week I posted a revision to a PowerShell script from the Microsoft AD team on discovering when a user's password was going to expire. Of course that's only half the battle. You probably still have local user accounts to keep track of like the local Administrator. Wouldn't you like to get the same information? There are no cmdlets for working with local user accounts, so I took a script from my book, Managing Active Directory with Windows PowerShell: TFM (SAPIEN Press 2008) and updated it for PowerShell 2.0. Even though the book is primarly about AD, there are several chapters on working with local users and groups. Anyway, I put together this 2.0 function.
Function Get-LocalUserPWdExpiration {
[cmdletBinding()]
Param (
[Parameter(Mandatory=$False,
Position=0,
ValueFromPipeline=$True,
HelpMessage="The name of the computer to query. The default is the local computer.")]
[string] $computername=$env:computername,
[Parameter(Mandatory=$False,
Position=1,
ValueFromPipeline=$False,
&nb
...continue reading "Get Local Account Password Expiration"


4
197
1
4
2
37
16
45
195
611
2
3
100
13
11
1
Welcome to The Experts Community!
We've created this site so that the
general community of Active Directory administrators has a place to ask AD-related questions, as well as
questions related to identity management in general. This is also a repository of content, including
numerous papers and other resources, and links to other useful Web sites, books, and online materials.
We encourage you to participate: Create an account, subscribe to an RSS feed, ask a question, or offer
an answer. Thanks for visiting!