• This is a great way to collect the security state of my servers. Took a bit of tinkering to get it all to work - i wanted the SQLPSX data in an existing meta data database that i have so wanted all the objects in their own schema. Lots of minor changes to the script, changing dbo. to SQLPSX. and we got there!

    I cannot (yet) get the SQL job to run via SQL Agent. The 2nd step "C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.EXE -command "C:\SQLPSX\run-SmoToCsvFile.ps1 2>&1"" fails with error "Executed as user: . Unable to open Step output file. The step failed."

    When i run the same command from the command prompt it executes with no error so i am thinking its permissions based??

    Off to tweak the reports now.

    Many, many thanks for such a useful project

    Jonathan