Since version 1.1.x we are collecting volume information from Win32_Volume invoked by PowerShell.
In some cases you may be getting the following error when running Step 2 of the SQLWATCH-LOGGER-DISK-UTILISATION Agent Job:
Cannot open database "SQLWATCH" requested by the login. The login failed. Login failed for user 'HOME\SQL-TEST-1$'
This is because PowerShell jobs run under a SQL Agent context and this means they may not have permissions to the SQL Server and the SQLWATCH database.
The most secure way is to create a SQL Agent Proxy Account and grant this account db_datawriter and db_datareader roles in the SQLWATCH database. This account will need appropriate access to read OS disks. This account will ONLY have access you have created.
An alternative and slightly easier way is to grant db_datawriter and db_datareader roles to the login reported in the error in the SQLWATCH database. However, in this case, we may be granting permission to the SQLWATCH database to an account that perhaps should not have such access. Please be sure you are familiar with the security configuration in your environment.
In our example this would be:
USE [master] GO CREATE LOGIN [HOME\SQL-TEST-1$] FROM WINDOWS GO USE [SQLWATCH] GO CREATE USER [HOME\SQL-TEST-1$] FOR LOGIN [HOME\SQL-TEST-1$] GO ALTER ROLE [db_datawriter] ADD MEMBER [HOME\SQL-TEST-1$] GO ALTER ROLE [db_datareader] ADD MEMBER [HOME\SQL-TEST-1$] GO