Solved Use Powershell to audit Windows service accounts
-
Simple enough - I need a script that will generate a report of all services running on non-standard accounts. I'm testing a couple found online, but they aren't doing the thing exactly.
This one: https://robbiecrash.me/powershell-audit-service-accounts/ ran for a bit then errored out.
Currently running this one: https://gallery.technet.microsoft.com/scriptcenter/Get-ADComputerServiceAccoun-8bb81568 slow, but seems to be working (and has a switch to output a csv file).
Anyone have a specific script for this? Got any brilliant ideas or tips that I'm missing? I'm not sharp enough on PS to see what is incorrect.
-
Unless you're wanting to use Powershell for a learning experience you might look at something like this: http://www.cjwdev.com/Software/ServiceCredMan/Info.html. If you still want to use the Powershell route this might be a good way to check the success of your script.
-
I started by going into our main servers and exporting the list of services from services.msc. Works fine, but I know we have some oddball accounts running services, and I don't want to manually repeat this ad nauseum.
-
I have really looked in using PowerShell to audit Windows service accounts.
I have used SaltStack to manage windows services but that's about it.
https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.win_service.html -
This post is deleted! -
Unless you're wanting to use Powershell for a learning experience you might look at something like this: http://www.cjwdev.com/Software/ServiceCredMan/Info.html. If you still want to use the Powershell route this might be a good way to check the success of your script.
-
@Kelly said in Use Powershell to audit Windows service accounts:
Unless you're wanting to use Powershell for a learning experience you might look at something like this: http://www.cjwdev.com/Software/ServiceCredMan/Info.html. If you still want to use the Powershell route this might be a good way to check the success of your script.
That looks like it will do exactly what we want... thanks for the link.