Reputation: 63
I'm facing a problem. I have these 3 servers:
1 Server1
2 Server2
3 Server3
I want to create a job on Server1
which will send email in html format include drives spaces xp_fixeddrives
of all three servers.
Please help me - what will be best scenario to achieve this?
Upvotes: 0
Views: 3791
Reputation: 666
If you have linked server for server2 & server3 in server1 then you can execute like below
EXEC master.dbo.xp_fixeddrives
EXEC Server2.master.dbo.xp_fixeddrives
EXEC Server3.master.dbo.xp_fixeddrives
Best approach is run the powershell script from SQL job. please check the below example https://gallery.technet.microsoft.com/scriptcenter/PowerShell-and-Notification-50630dc9
Upvotes: 0