Here is a simple script that allows you to avoid populating a table with servers. I'd suggest using reporting services to email results to your end users.
/*
** This table holds the drive space data
*/
create table serverdrivespace
(
name sysname
, drive sysname
, mbfree nvarchar(255)
)
/*
** This script populates the serverdrivespace table
*/
truncate table serverdrivespace
create table #servers
(
name sysname not null
, network_name sysname null
, status nvarchar(255) not null
, id int not null
, collation_name sysname null
, connect_timeout int not null
, query_timeout int not null
)
create table #drivespace
(
drive sysname
, mbfree nvarchar(255)
)
declare server_cursor cursor for
select name from #servers
where status like '%rpc,%'
begin try
insert into #servers
exec sp_helpserver
declare @name sysname
open server_cursor
fetch next from server_cursor into @name
declare @sql nvarchar(4000)
while @@fetch_status = 0
begin
set @sql = 'exec [' + @name + '].master.dbo.xp_fixeddrives'
print @sql
truncate table #drivespace
insert into #drivespace
exec sp_executesql @sql
insert into serverdrivespace
select @name as servername, *
from #drivespace
fetch next from server_cursor into @name
end
close server_cursor
end try
begin catch
SELECT
ERROR_NUMBER() AS ErrorNumber
,ERROR_SEVERITY() AS ErrorSeverity
,ERROR_STATE() AS ErrorState
,ERROR_PROCEDURE() AS ErrorProcedure
,ERROR_LINE() AS ErrorLine
,ERROR_MESSAGE() AS ErrorMessage;
end catch
select * from serverdrivespace
deallocate server_cursor
drop table #drivespace
drop table #servers
An upgrade to this would be an SSIS package that uses WMI to get drive information from remote servers. You could monitor the entire network this way instead of limiting yourself to just SQL Servers.