ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Solved Use Powershell to audit Windows service accounts

    IT Discussion
    ps powershell scripting windows
    4
    6
    1.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • RojoLocoR
      RojoLoco
      last edited by RojoLoco

      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.

      1 Reply Last reply Reply Quote 3
      • KellyK
        Kelly
        last edited by

        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.

        RojoLocoR 1 Reply Last reply Reply Quote 1
        • RojoLocoR
          RojoLoco
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • black3dynamiteB
            black3dynamite
            last edited by

            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

            1 Reply Last reply Reply Quote 1
            • IRJI
              IRJ
              last edited by IRJ

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • KellyK
                Kelly
                last edited by

                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.

                RojoLocoR 1 Reply Last reply Reply Quote 1
                • RojoLocoR
                  RojoLoco @Kelly
                  last edited by

                  @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.

                  1 Reply Last reply Reply Quote 1
                  • 1 / 1
                  • First post
                    Last post