List out all Log On As account details in Services.msc

  • Hi All,

    If I need to extract all the services.msc services "Log On As" account details and the "Startup Type", how will I find the details?

    Is there any Powershell cmdlets/WMI SQL Scripts available to get the details?

    Please suggest.

    Thanks.

  • Does this help?

    SELECT

    servicename,

    service_account

    FROM sys.dm_server_services

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • Thanks Mike.

    Other than SQL Accounts, if I need to gather details of all the services then any easy way to get it using T SQL?

    Problem is in many services, the Powershell ISE is not installed so tough to run script.

    Thanks.

  • Powershell does not have to be installed on each server.

    I'm guessing that you can connect to each server from a central location and run a powershell script.

    Try this resource:

    https://gallery.technet.microsoft.com/scriptcenter/Get-service-account-list-105de3ca

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • You can use other machines and run it remotely as already indicated.

    Another option is to just run a Powershell job step from SQL Server. It's pretty basic one to get the services and accounts:

    Get-WmiObject win32_service | Format-Table name, startname |Out-file X:\WhateverPath\Services.txt

    Or a similar WMI script in whatever scripting tool works for you.

    Sue

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply