I’m continuing with my renewed interest in Active Directory, and how I can take advantage of PowerShell. This is a topic I’ve been working with since the PowerShell v2 days. I have a lot of old code. Some of which I’ve decided to dust off and polish up. One topic that always interested me, is…
Tag: ADSI
Get Local Group Members Revisited
The other day I posted an article and function that used ADSI and PowerShell to list members of a local group. I had a few people report an unusual error that I couldn’t replicate. During the course of troubleshooting, I made a few changes to the original function to at least better handle the mysterious…
Get Local Group Members with PowerShell
Recently I posted a function to get information about local user accounts. I received a lot of positive feedback so it seemed natural to take this the next step and create a similar function to enumerate or list members of a local group, such as Administrators. The function, Get-LocalGroupMember, also relies on ADSI and is…
Getting Local User Accounts the PowerShell Way
It seems I’m always seeing requests and problems on getting local user accounts using PowerShell. However, even though we are at PowerShell 5.0, Microsoft has never released a set of cmdlets for managing local user accounts. So many of us have resorted to creating our own tools. I now have my latest iteration of a…
Set Local User Account with PowerShell
The other day I received an email from a student asking for some help in using PowerShell to take care of a user account on a local computer. He not only wanted to be able to set the password, which he had already figured out, but also how to enable or disable the account, which…
Managing Local Admin with PowerShell
Years ago when I was deep into VBScript and HTAs, I wrote a tool called PWDMan. It was an HTA that processed a list of computers and returned password age information for the local administrator account. It was also capable of setting a new account password. Apparently this is still a common task because I’ll…
How Old is the Admin Password
Here’s a quick one-liner to find out how old the administrator password age (in days) is on a remote machine. ([adsi]”WinNT://<COMPUTERNAME>/administrator”).passwordage.value/86400 This requires RPC/DCOM access to the remote computer. Or use PowerShell remoting with Invoke-Command: invoke-command { new-object PSObject -property @{ Computername = $env:computername AdminAge = ([adsi]”WinNT://$env:computername/administrator”).passwordage.value/86400 } } -ComputerName $computers | Select Computername,AdminAge
Updating Multi-Valued Active Directory Properties Part 1
Yesterday on Twitter, I got a tweet from @Docsmooth regarding how to update a multivalued property in Active Directory. There are a number of ways to handle this, especially from PowerShell naturally, so I tweeted one way in a series of tweets. But that’s a hard way to learn something, and anyone jumping in the…
Get Local Admins One-Liner
Working with local users and groups can get a little messy in PowerShell. But I wanted to share a quick one-liner you could use to list all the members of the Administrators group.
Create New Computer with ADSI
UPDATE 12 Sept. 2022: In attempting to correct obsolete information( this was originally published in 2011), I removed the contents of this post. But I did manage to save the function, which is all you probably care about anyway.
New Book Project – Reviewers Needed
While at Microsoft TechEd, I signed the paperwork to write a second edition of Managing Active Directory with Windows PowerShell: TFM for SAPIEN Press. It’s hard to believe so much has happened since that book hit the shelves in less than 2 years. The 2nd edition will continue to include coverage of Quest Software’s PowerShell…
Updated Domain Password Script
This month’s Mr. Roboto column offers a script you can use with PowerShell to build a domain password report. There were few issues that came up which have since been resolved. You can download the latest version, currently 1.2 at www.jdhitsolutions.com/scripts in the Mr. Roboto section.
Waynes World of Tips
I’ve blogged in the past about Wayne Martin and his outstanding list of command line tips. These are one line commands, some complex some simple, that you can use to accomplish a wide range of task. The overall number of tips is to 425 and Wayne recently reorganized them into 7 categories to make it…
Order Managing Active Directory with Windows PowerShell: TFM – Finally!
Yes, its finally true. You can finally get your hands on Managing Active Directory with Windows PowerShell: TFM. The book is being printed so you can get your copy today. You can order it today at ScriptingOutpost.com in both print and ebook format. Or if you prefer the best of both worlds get both as…
My Published Works
I’m trying out a new Live Write plugin for Amazon. Here is a list of books I have currently authored or co-authored. This list will continue to grow as I’m working on a new book now about managing Active Directory with PowerShell. WSH and VBScript Core: TFM by Jeffery Hicks Read more about this book……