|
77 | 77 | DisplayName = 'TestSMSA' |
78 | 78 | Enabled = $true |
79 | 79 | KerberosEncryptionType = 'RC4', 'AES128', 'AES256' |
| 80 | + ServicePrincipalNames = 'MSSQLSvc/Node1.contoso.com','HTTP/Node1','HTTP/Node1.contoso.com' |
80 | 81 | TrustedForDelegation = $false |
81 | 82 | ManagedPasswordPrincipals = @() |
82 | 83 | MembershipAttribute = 'SamAccountName' |
|
94 | 95 | ManagedPasswordPrincipals = @() |
95 | 96 | MembershipAttribute = $mockAdServiceAccountStandalone.MembershipAttribute |
96 | 97 | KerberosEncryptionType = @() |
| 98 | + ServicePrincipalNames = @() |
97 | 99 | Ensure = 'Absent' |
98 | 100 | } |
99 | 101 |
|
|
102 | 104 | Description = 'Changed description' |
103 | 105 | DisplayName = 'Changed displayname' |
104 | 106 | KerberosEncryptionType = 'AES128', 'AES256' |
| 107 | + ServicePrincipalNames = 'MSSQLSvc/Node1.contoso.com','HTTP/Node1' |
105 | 108 | ManagedPasswordPrincipals = $mockADUSer.SamAccountName |
106 | 109 | } |
107 | 110 |
|
|
114 | 117 | DisplayName = 'TestGMSA' |
115 | 118 | Enabled = $true |
116 | 119 | KerberosEncryptionType = 'RC4', 'AES128', 'AES256' |
| 120 | + ServicePrincipalNames = 'MSSQLSvc/Node1.contoso.com','HTTP/Node1','HTTP/Node1.contoso.com' |
117 | 121 | TrustedForDelegation = $true |
118 | 122 | ManagedPasswordPrincipals = $mockADUSer.SamAccountName, $mockADComputer.SamAccountName |
119 | 123 | MembershipAttribute = 'SamAccountName' |
|
131 | 135 | ManagedPasswordPrincipals = @() |
132 | 136 | MembershipAttribute = $mockAdServiceAccountGroup.MembershipAttribute |
133 | 137 | KerberosEncryptionType = @() |
| 138 | + ServicePrincipalNames = @() |
134 | 139 | TrustedForDelegation = $null |
135 | 140 | Ensure = 'Absent' |
136 | 141 | } |
|
142 | 147 | DistinguishedName = $mockAdServiceAccountStandalone.DistinguishedName |
143 | 148 | Enabled = $mockAdServiceAccountStandalone.Enabled |
144 | 149 | KerberosEncryptionType = $mockAdServiceAccountStandalone.KerberosEncryptionType |
| 150 | + ServicePrincipalNames = $mockAdServiceAccountStandalone.ServicePrincipalNames |
145 | 151 | TrustedForDelegation = $mockAdServiceAccountStandalone.TrustedForDelegation |
146 | 152 | Name = $mockAdServiceAccountStandalone.ServiceAccountName |
147 | 153 | ObjectClass = 'msDS-ManagedServiceAccount' |
|
158 | 164 | DistinguishedName = $mockAdServiceAccountGroup.DistinguishedName |
159 | 165 | Enabled = $mockAdServiceAccountGroup.Enabled |
160 | 166 | KerberosEncryptionType = $mockAdServiceAccountGroup.KerberosEncryptionType |
| 167 | + ServicePrincipalNames = $mockAdServiceAccountGroup.ServicePrincipalNames |
161 | 168 | TrustedForDelegation = $mockAdServiceAccountGroup.TrustedForDelegation |
162 | 169 | Name = $mockAdServiceAccountGroup.ServiceAccountName |
163 | 170 | ObjectClass = 'msDS-GroupManagedServiceAccount' |
|
183 | 190 | Credential = $mockCredentials |
184 | 191 | DomainController = $mockDomainController |
185 | 192 | KerberosEncryptionType = 'RC4', 'AES128', 'AES256' |
| 193 | + ServicePrincipalNames = 'MSSQLSvc/Node1.contoso.com','HTTP/Node1','HTTP/Node1.contoso.com' |
186 | 194 | TrustedForDelegation = $false |
187 | 195 |
|
188 | 196 | } |
|
202 | 210 | Credential = $mockCredentials |
203 | 211 | DomainController = $mockDomainController |
204 | 212 | KerberosEncryptionType = 'RC4', 'AES128', 'AES256' |
| 213 | + ServicePrincipalNames = 'MSSQLSvc/Node1.contoso.com','HTTP/Node1','HTTP/Node1.contoso.com' |
205 | 214 | TrustedForDelegation = $false |
206 | 215 | } |
207 | 216 |
|
|
218 | 227 | ManagedPasswordPrincipals = @() |
219 | 228 | MembershipAttribute = 'SamAccountName' |
220 | 229 | KerberosEncryptionType = @() |
| 230 | + ServicePrincipalNames = @() |
221 | 231 | TrustedForDelegation = $null |
222 | 232 | } |
223 | 233 |
|
|
434 | 444 | Description = $mockAdServiceAccountStandalone.Description |
435 | 445 | DisplayName = $mockAdServiceAccountStandalone.DisplayName |
436 | 446 | KerberosEncryptionType = $mockAdServiceAccountStandalone.KerberosEncryptionType |
| 447 | + ServicePrincipalNames = $mockAdServiceAccountStandalone.ServicePrincipalNames |
437 | 448 | ManagedPasswordPrincipals = $mockAdServiceAccountStandalone.ManagedPasswordPrincipals |
438 | 449 | MembershipAttribute = $mockAdServiceAccountStandalone.MembershipAttribute |
439 | 450 | Ensure = $mockAdServiceAccountStandalone.Ensure |
|
567 | 578 | Ensure = $mockAdServiceAccountStandAlone.Ensure |
568 | 579 | DisplayName = $mockAdServiceAccountStandAlone.DisplayName |
569 | 580 | KerberosEncryptionType = $mockAdServiceAccountStandAlone.KerberosEncryptionType |
| 581 | + ServicePrincipalNames = $mockAdServiceAccountStandalone.ServicePrincipalNames |
570 | 582 | } |
571 | 583 |
|
572 | 584 | $setTargetResourceParametersStandAloneAbsent = $setTargetResourceParametersStandAlone.Clone() |
|
583 | 595 | ManagedPasswordPrincipals = $mockAdServiceAccountGroup.ManagedPasswordPrincipals |
584 | 596 | DisplayName = $mockAdServiceAccountGroup.Name.DisplayName |
585 | 597 | KerberosEncryptionType = $mockAdServiceAccountGroup.KerberosEncryptionType |
| 598 | + ServicePrincipalNames = $mockAdServiceAccountGroup.ServicePrincipalNames |
586 | 599 | } |
587 | 600 | Context 'When the Resource should be Present' { |
588 | 601 |
|
|
0 commit comments