How To Export Login History For All Users From Orchestrator

How to export login history for all users from Orchestrator and where is user login attempts information found?

  • Currently, Orchestrator does not show login history in audit logs for all users from admin/sys admin accounts.
  • However, this information is stored within the Orchestrator's database.
    Import-Module sqlps
    $SQLServer = "<SQL SERVER>"
    $DatabaseName = "<DATABASE NAME>"
    $ExportLocation = "<EXPORT PATH>\LoginAttempts.csv"
    $SQLquery="select * from dbo.UserLoginAttempts"
        $result=invoke-sqlcmd -query $SQLquery -serverinstance $SQLServer -database $DatabaseName
        Write-Host "Now Exporting"
        $result |export-csv "$ExportLocation" -notypeinformation

Included above is a powershell script that will pull the information available in dbo.UserLoginAttempts into a CSV.

Just replace <SQL SERVER> , <DATABASE NAME> and <EXPORT PATH> with the target SQL Server information.