Examples/PostInstallationConfiguration/PostInstallationConfiguration-Config.psd1

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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
@{
    AllNodes = @(
        #Settings under 'NodeName = *' apply to all nodes.
        @{
            NodeName        = '*'

            #CertificateFile and Thumbprint are used for securing credentials. See:
            #http://blogs.msdn.com/b/powershell/archive/2014/01/31/want-to-secure-credentials-in-windows-powershell-desired-state-configuration.aspx
            
            #The location on the compiling machine of the public key export of the certfificate which will be used to encrypt credentials
            CertificateFile = 'C:\publickey.cer' 

            #Thumbprint of the certificate being used for encrypting credentials
            Thumbprint      = '39bef4b2e82599233154465323ebf96a12b60673' 
        }

        #Individual target nodes are defined next
        @{
            NodeName      = 'e15-1'
            Fqdn          = 'e15-1.mikelab.local'
            Role          = 'FirstDAGMember'
            DAGId         = 'DAG1' #Used to determine which DAG settings the servers should use. Corresponds to DAG1 hashtable entry below.
            CASId         = 'Site1CAS' #Used to determine which CAS settings the server should use. Corresponds to Site1CAS hashtable entry below.

            #DB's that should be on the same disk must be in the same string, and comma separated. In this example, DB1 and DB2 will go on one disk, and DB3 and DB4 will go on another
            DiskToDBMap   = 'DB1,DB2','DB3,DB4'

            #Configure the databases whose primary copies will reside on this server
            PrimaryDBList = @{
                DB1 = @{Name = 'DB1'; EdbFilePath = 'C:\ExchangeDatabases\DB1\DB1.db\DB1.edb'; LogFolderPath = 'C:\ExchangeDatabases\DB1\DB1.log'};
                DB3 = @{Name = 'DB3'; EdbFilePath = 'C:\ExchangeDatabases\DB3\DB3.db\DB3.edb'; LogFolderPath = 'C:\ExchangeDatabases\DB3\DB3.log'}
            }

            #Configure the copies next.
            CopyDBList    = @{
                DB2 = @{Name = 'DB2'; ActivationPreference = 2; ReplayLagTime = '00:00:00'};
                DB4 = @{Name = 'DB4'; ActivationPreference = 2; ReplayLagTime = '00:00:00'}
            }
        }

        @{
            NodeName      = 'e15-2'
            Fqdn          = 'e15-2.mikelab.local'
            Role          = 'AdditionalDAGMember'
            DAGId         = 'DAG1'
            CASID         = 'Site1CAS'

            DiskToDBMap   = 'DB1,DB2','DB3,DB4'

            PrimaryDBList = @{
                DB2 = @{Name = 'DB2'; EdbFilePath = 'C:\ExchangeDatabases\DB2\DB2.db\DB2.edb'; LogFolderPath = 'C:\ExchangeDatabases\DB2\DB2.log'};
                DB4 = @{Name = 'DB4'; EdbFilePath = 'C:\ExchangeDatabases\DB4\DB4.db\DB4.edb'; LogFolderPath = 'C:\ExchangeDatabases\DB4\DB4.log'}
            }

            CopyDBList    = @{
                DB1 = @{Name = 'DB1'; ActivationPreference = 2; ReplayLagTime = '00:00:00'};
                DB3 = @{Name = 'DB3'; ActivationPreference = 2; ReplayLagTime = '00:00:00'}
            }
        }

        @{
            NodeName    = 'e15-3'
            Fqdn        = 'e15-3.mikelab.local'
            Role        = 'AdditionalDAGMember'
            DAGId       = 'DAG1'
            CASID       = 'Site2CAS'

            DiskToDBMap = 'DB1,DB2','DB3,DB4'

            CopyDBList  = @{
                DB1 = @{Name = 'DB1'; ActivationPreference = 3; ReplayLagTime = '00:00:00'};
                DB2 = @{Name = 'DB2'; ActivationPreference = 4; ReplayLagTime = '7.00:00:00'}; #Lag copy
                DB3 = @{Name = 'DB3'; ActivationPreference = 3; ReplayLagTime = '00:00:00'};
                DB4 = @{Name = 'DB4'; ActivationPreference = 4; ReplayLagTime = '7.00:00:00'} #Lag copy
            }
        }

        @{
            NodeName    = 'e15-4'
            Fqdn        = 'e15-4.mikelab.local'
            Role        = 'AdditionalDAGMember'
            DAGId       = 'DAG1'
            CASID       = 'Site2CAS'

            DiskToDBMap = 'DB1,DB2','DB3,DB4'

            CopyDBList  = @{
                DB1 = @{Name = 'DB1'; ActivationPreference = 4; ReplayLagTime = '7.00:00:00'}; #Lag copy
                DB2 = @{Name = 'DB2'; ActivationPreference = 3; ReplayLagTime = '00:00:00'};
                DB3 = @{Name = 'DB3'; ActivationPreference = 4; ReplayLagTime = '7.00:00:00'}; #Lag copy
                DB4 = @{Name = 'DB4'; ActivationPreference = 3; ReplayLagTime = '00:00:00'}
            }
        }
    );

    #Settings that are unique per DAG will go in separate hash table entries.
    DAG1 = @(
        @{
            ###DAG Settings###
            DAGName                              = 'TestDAG1'           
            AutoDagTotalNumberOfServers          = 4     
            AutoDagDatabaseCopiesPerVolume       = 2
            DatabaseAvailabilityGroupIPAddresses = '192.168.1.99','192.168.2.99'     
            ManualDagNetworkConfiguration        = $true
            ReplayLagManagerEnabled              = $true
            SkipDagValidation                    = $true
            WitnessServer                        = 'e14-1.mikelab.local'

            #xDatabaseAvailabilityGroupNetwork params
            #New network params
            DAGNet1NetworkName                   = 'MapiNetwork'
            DAGNet1ReplicationEnabled            = $false
            DAGNet1Subnets                       = '192.168.1.0/24','192.168.2.0/24'

            DAGNet2NetworkName                   = 'ReplNetwork'
            DAGNet2ReplicationEnabled            = $true
            DAGNet2Subnets                       = '10.10.10.0/24','10.10.11.0/24'

            #Old network to remove
            OldNetworkName                       = 'MapiDagNetwork'

            #Certificate Settings
            Thumbprint                           = '7D959B3A37E45978445F8EC8F01D200D00C3141F'
            CertFilePath                         = 'c:\certexport1.pfx'
            Services                             = 'IIS','POP','IMAP','SMTP'
        }
    );

    #CAS settings that are unique per site will go in separate hash table entries as well.
    Site1CAS = @(
        @{
            InternalNLBFqdn            = 'mail-site1.mikelab.local'
            ExternalNLBFqdn            = 'mail.mikelab.local'

            #ClientAccessServer Settings
            AutoDiscoverSiteScope      = 'Site1'

            #OAB Settings
            OABsToDistribute           = 'Default Offline Address Book - Site1'

            #OWA Settings
            InstantMessagingServerName = 'lync-site1.mikelab.local'
        }
    );

    Site2CAS = @(
        @{
            InternalNLBFqdn            = 'mail-site2.mikelab.local'
            ExternalNLBFqdn            = 'mail.mikelab.local'

            #ClientAccessServer Settings
            AutoDiscoverSiteScope      = 'Site2'

            #OAB Settings
            OABsToDistribute           = 'Default Offline Address Book - Site2'

            #OWA Settings
            InstantMessagingServerName = 'lync-site2.mikelab.local'
        }
    );
}