Download Postgres module

Download the module and modify ROOT_PSstub.ps1/.py - out of the box it lists just the current server. You should probably want to add more from one of the inventories. Contribute more on Github.

Download ZIP (Powershell)Download ZIP (Python)

You will also need one of the login.ps1 files, if you don't have one already:

  • loginDummy.zipis a stub, it accepts any login with a password "root"
  • checks user credentials in AD system, groups are always 'RO;RW'
  • checks what AD groups user belongs to, requires additional cmdlet Get-ADPrincipalGroupMembership to be installed on a server. Edit AD groups names - they are different in every company

Audit file, audit.ps1 - is available in 3 different sample versions:

  • - blank audit, does nothing
  • - appends to bell.log in HOMEPATH of a service account used (may be you would like to change the directory?)
  • - logs to a table (MSSQL). Replace target server name and database name. Execute audit.sql before using to create an audit table and procedure