Rob Sewell has a nice post on checking database file sizes using dbatools in Powershell:
As always, PowerShell uses the permissions of the account running the sessions to connect to the SQL Server unless you provide a separate credential for SQL Authentication. If you need to connect with a different windows account you will need to hold Shift down and right click on the PowerShell icon and click run as a different user.
Lets get the information for a single database. The command has dynamic parameters which populate the database names to save you time and keystrokes
It’s a great post, save for the donut chart… Anyhow, this is recommended reading.
Comments closed