Posts Tagged ‘ADSI’


Get Local Member

Thursday, April 9th, 2009 by Jeffery Hicks
I've been dealing with the topic of enumerating local group membership in several PowerShell forums from different people. My responses have pretty much been the same. But if these people are asking its a safe bet there are others who are also in need. The bottom line has been to query a local group, typically Administrators, and return a list of group members. If the member is a domain account, then get a little extra information. I put together a script called Get-Localmember.ps1 that I think will get the job done for most of you.   More »

Get ServiceAccount Name with ADSI

Tuesday, March 31st, 2009 by Jeffery Hicks
One drawback to the service objects returned from Get-Service is that you can't see what account the service is running under, often referred to as the service account. This will be something like LocalService or perhaps even a special user account like Mydomain\svcAccount123. You can retrieve this information by querying Windows Management Instrumentation (WMI) and the Win32_Service class. But did you know you can also use ADSI?   More »

Hash Table Happiness

Monday, February 23rd, 2009 by Jeffery Hicks
The other day I wrote an entry about using the Dictionary object in VBScript . I alluded to how you could use a hash table in PowerShell. Let me show you how and I think you'll also appreciate how much more you can do with them in PowerShell with less coding.   More »

Local Password Management Form

Tuesday, January 13th, 2009 by Jeffery Hicks
I'm very happy to see PrimalForms spreading in popularity and acceptance. One topic I come across is the need for more samples, and of course, I'm happy to oblige. I put together a short form script to manage local account passwords.   More »

Where do I begin?

Tuesday, December 2nd, 2008 by Jeffery Hicks
"I'm new to scripting and need a book recommendation." "Should I learn VBScript or PowerShell?" "What are some good books for learning scripting?" These are natural and common questions. A few years ago the answers would have been simple. But today if you are just getting started with administrative scripting, the answers only bring more questions. The real question isn't what book should you read but what technology should you learn? If you are a a SAPIEN blog reader I'm going to assume that the choice comes down to VBScript or PowerShell. The quick answer is to learn both, but I realize that's not practical. So let's look at this a bit further and realize that some of this will change once PowerShell v2.0 is released as part of Windows 7 and depending on your adoption of Windows 7.   More »

PrimalScript Samples

Monday, November 10th, 2008 by Jeffery Hicks
Here's another tidbit about PrimalScript that you may not be aware of. Not only does PrimalScript offer a large number of code snippets that you can drag and drop into your scripting or development project, but it also includes a large number of complete sample scripts.   More »

More fun with services, PowerShell and ADSI

Tuesday, September 30th, 2008 by Jeffery Hicks
The other day I showed you how to use ADSI and PowerShell to manage services on remote computers. Since the ADSI type adapter is admittedly "kludgy" at times, I put together a script that you could use like a cmdlet to retrieve service information via ADSI.   More »

Managing Services with PowerShell and ADSI

Monday, September 29th, 2008 by Jeffery Hicks
In PowerShell v1.0, if you want to manage services on a remote computer, you likely used WMI and the Get-WMIObject cmdlet. But there is another solution using ADSI. If you use the WinNT provider, you can access all of the services on a remote machine in much the same way you would manage local users and groups. Let me show you.   More »

Managing Active Directory with Windows PowerShell – IN PRINT!

Monday, September 22nd, 2008 by Jeffery Hicks
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 in both print and ebook format. Or if you prefer the best of both worlds get both as a bundle.   More »

Techmentor NYC

Wednesday, September 3rd, 2008 by Jeffery Hicks
I've been getting things ready for my next Techmentor appearance. This one is practically in my back yard. I'll be in NYC on Monday and Tuesday next week.   More »