Eulanda / EulandaConnect

A PowerShell library that provides functionality for integrating and connecting with Eulanda, both within and outside of ERP contexts.
https://www.eulanda.eu
MIT License
1 stars 0 forks source link

Add new Test-MssqlAdministrator #20

Closed cnEUL closed 1 year ago

cnEUL commented 1 year ago

Adding a new function inc.. Pestertest in this way:

function Test-MssqlAdministrator {
    $conn = Get-Conn -udl $udl
    $sql = "SELECT IS_SRVROLEMEMBER('sysadmin')"
    $rs = $conn.Execute($sql)
    $result = ($rs.Fields.Item(0).Value -ne 1)
    $rs.close()
    $conn.close()
}
cnEUL commented 1 year ago

Closed with https://github.com/Eulanda/EulandaConnect/commit/92d36e133684c98c6b2d8e21a34272d31dd71d0b