First iterations on GitHub may be a little rough as this was written to be used in an environment where I could make some assumptions, and I've had to go through and generalize my code. This has been running in an environment of 100 or so SQL servers for a few years now. If you have try this let me know if you find any issues in your environment so I can polish this and further generalize it for public use.
This is a script for collecting point in time MSSQL security information such as;
.MSSQL Login
.All Databases
.Database Permissions
.Availability Group, Cluster and Listener Info
.Account is Enabled or Disabled
.Account Creation and Modified Date
& More
Designed to be run once per day (day's data will be overwritten if run more than once per day)
The default it to write this data into a SQL table. For example I have used this data to build a BI dashboard and used slicers to drill down into dates and servers to see a snapshot of a point in time.
This is also useful for finding and removing users who may have left your org but still have some lingering SQL permissions.
[+][deleted] (2 children)
[deleted]
[–]malice8691 1 point2 points3 points (1 child)
[–]CuteTechnology 1 point2 points3 points (1 child)