See my PS script at https://github.com/mubix/PowerShell-1/blob/master/EnumSqlServer.ps1
Script for sql accessment
Hi Experts,
Can you please suggest a powershell script which can do some basic assessment of a onpremise sql server like version , edition , number and size of databases , whatever possible
SQL Server | Other
1 additional answer
Sort by: Most helpful
-
YufeiShao-msft 7,146 Reputation points
2022-03-02T06:45:45.263+00:00 Hi @Vishu ,
Here is a script that reads a .txt file that lists all my SQL servers and gets the file name, file path, file size, and size used for the data file (.mdf) and log file (.ldf) for each database on each server in the .txt file:
https://www.mssqltips.com/sqlservertip/2698/use-powershell-to-gather-sql-server-database-physical-file-sizes/PowerShell do an Inventory of your Servers, about use PowerShell to gather SQL Server information such as edition, version, logins, databases, configuration and errors.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.