NetSPI/PowerUpSQL

Feature Request - Check output folder for write access

mubix opened this issue · 1 comments

mubix commented

It's super frustrating to get through a huge SQLAudit only to find out the directory it's going to try to write to isn't writable by the current user.

Fair enough. I updated invoke-sqlaudit. It now checks for write access to the provided output directory prior to starting the audit.

In the future also consider writing the output to a variable for reuse. That way results can also be written to another directory if needed.

Example:

$Results = Invoke-SQLAudit -Verbose -Instance server\instance 
$Results | Export-Csv -NotTypeInformation c:\temp\mysqlaudit.csv