Can anyone advice me how to write a script to automate TempDB
free space check on SQL Server instances?
At the moment I connect to all instances individually and run the script
use tempdb
exec sp_spaceused
I have to repeat this for 10 other instances, which is very time consuming. I am a beginner and not very familiar with scripting. I would really appreciate if anyone could advice me on how to set up script to do this automatically so I can simply open a file to check the free space for the day for all instances.