functions/get-d365databaseaccess.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

<#
    .SYNOPSIS
        Shows the Database Access information for the D365 Environment
         
    .DESCRIPTION
        Gets all database information from the D365 environment
         
    .EXAMPLE
        PS C:\> Get-D365DatabaseAccess
         
        This will get all relevant details, including connection details, for the database configured for the environment
         
    .NOTES
        Tags: Database, Connection, Sql, SqlUser, SqlPwd
         
        Author: Rasmus Andersen (@ITRasmus)
         
        The cmdlet wraps the call against a dll file that is shipped with Dynamics 365 for Finance & Operations.
        The call to the dll file gets all relevant connections details for the database server.
         
#>

function Get-D365DatabaseAccess {
    [CmdletBinding()]
    param ()

    $environment = Get-ApplicationEnvironment
    
    return $environment.DataAccess
}