Re: How can I enumerate services and list the account context under which they run???

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



My script does that. You'll end up with a CSV file with output like this (this is copied from the open file in Excel):

Server Display Name Service Name Service Account Name
PUCK Acronis Scheduler2 Service AcrSch2Svc LocalSystem
PUCK Application Experience AeLookupSvc localSystem
PUCK Agere Modem Call Progress Audio AgereModemAudio LocalSystem
PUCK Application Layer Gateway Service ALG NT AUTHORITY\LocalService
PUCK Application Information Appinfo LocalSystem

You'll need to create a text of servers and modify the script with the correct file name but isn't this what you want?

--
Jeffery Hicks MCSE, MCSA, MCT
Microsoft PowerShell MVP
http://www.scriptinganswers.com
http://www.powershellcommunity.org
http://jdhitsolutions.blogspot.com

Now Available: WSH and VBScript Core: TFM
Now Available: Windows PowerShell v1.0: TFM 2nd Ed.


"GBPackerBacker" <gbpackerbacker@xxxxxxxxx> wrote in message news:673d2a9b-3fb5-474f-a0bd-1ce3e87da777@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks for the reply, however my script does exactly that. What I'd
like, in addition to the services, I'd like to be able to determine
what account context it runs under. I need to find out what accounts
are using the system account, which ones have dedicated service
accounts, and which ones, if any, are using any users personal
accounts.

Can this be done with a script?

.



Relevant Pages

  • Re: Last Logon Time Stamp
    ... > I am new to script. ... > I need to list out inactive accounts more than 90 days in both AD accounts ... Use ADO to retrieve lastLogonTimeStamp for all users. ... And here is a sample program that retrieves the distinguishedName for all ...
    (microsoft.public.windows.server.scripting)
  • Re: Script to delete computer accounts not working
    ... thanks for the initial script as well. ... computer accounts that are disabled and haven't been modified for 30 days. ... Set objCommand = CreateObject ...
    (microsoft.public.scripting.vbscript)
  • Re: Running a script against an OU
    ... Do I need to place a forward slash between Computer and Accounts? ... run the script against an OU called lab1? ... the WinNT provider is blind to OU's, so you must use the LDAP provider to ... bind to the OU. ...
    (microsoft.public.scripting.vbscript)
  • Re: AD Attribute query!
    ... The scripting approach for modifying the CN attribute (using the MoveHere ... GAL will be surname, firstname as well.. ... However the script underneath it, only adjusts the display name, it does ... other accounts were created, it is rather difficult to speculate why ...
    (microsoft.public.windows.server.active_directory)
  • Re: Display All Locked Accounts in an OU
    ... > I have this script below I used from its source ... > particular OU and its sub-ou's for locked out accounts. ... you need only look at one domain controller. ... > Dim objRootDSE, strConfig, objConnection, objCommand, strQuery ...
    (microsoft.public.windows.server.scripting)