|
108 | 108 | Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Executing.Invoke' -StringValues 'Server Site Assignment', $parameters.Server |
109 | 109 | Invoke-FMServer @parameters |
110 | 110 | } |
111 | | - if ($newOptions -band [UpdateForestOptions]::Schema) { |
| 111 | + if ($newOptions -band [UpdateForestOptions]::ForestLevel) { |
| 112 | + if (Get-FMForestLevel) { |
| 113 | + Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Executing.Invoke' -StringValues 'ForestLevel', $parameters.Server |
| 114 | + Invoke-FMForestLevel @parameters |
| 115 | + } |
| 116 | + else { Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Skipping.Test.NoConfiguration' -StringValues 'ForestLevel' } |
| 117 | + } |
| 118 | + if ($newOptions -band [UpdateForestOptions]::SchemaLdif) { |
| 119 | + if (Get-FMSchemaLdif) { |
| 120 | + Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Executing.Invoke' -StringValues 'Schema (Ldif)', $parameters.Server |
| 121 | + Invoke-FMSchemaLdif @parameters |
| 122 | + } |
| 123 | + else { Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Skipping.Test.NoConfiguration' -StringValues 'Schema (Ldif)' } |
| 124 | + } |
| 125 | + if ($newOptions -band [UpdateForestOptions]::ExchangeSchema) { |
| 126 | + if (Get-FMExchangeSchema) { |
| 127 | + Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Executing.Invoke' -StringValues 'ExchangeSchema', $parameters.Server |
| 128 | + Invoke-FMExchangeSchema @parameters |
| 129 | + } |
| 130 | + else { Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Skipping.Test.NoConfiguration' -StringValues 'ExchangeSchema' } |
| 131 | + } |
| 132 | + if ( |
| 133 | + ($newOptions -band [UpdateForestOptions]::Schema) -or |
| 134 | + ($newOptions -band [UpdateForestOptions]::SchemaManage) |
| 135 | + ) { |
112 | 136 | if (Get-FMSchema) { |
113 | 137 | Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Executing.Invoke' -StringValues 'Schema (Custom)', $parameters.Server |
114 | 138 | Invoke-FMSchema @parameters |
|
122 | 146 | } |
123 | 147 | else { Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Skipping.Test.NoConfiguration' -StringValues 'Schema Default Permissions' } |
124 | 148 | } |
125 | | - if ($newOptions -band [UpdateForestOptions]::SchemaLdif) { |
126 | | - if (Get-FMSchemaLdif) { |
127 | | - Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Executing.Invoke' -StringValues 'Schema (Ldif)', $parameters.Server |
128 | | - Invoke-FMSchemaLdif @parameters |
129 | | - } |
130 | | - else { Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Skipping.Test.NoConfiguration' -StringValues 'Schema (Ldif)' } |
131 | | - } |
132 | 149 | if ($newOptions -band [UpdateForestOptions]::NTAuthStore) { |
133 | 150 | if (Get-FMNTAuthStore) { |
134 | 151 | Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Executing.Invoke' -StringValues 'NTAuthStore', $parameters.Server |
|
143 | 160 | } |
144 | 161 | else { Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Skipping.Test.NoConfiguration' -StringValues 'Certificate' } |
145 | 162 | } |
146 | | - if ($newOptions -band [UpdateForestOptions]::ForestLevel) { |
147 | | - if (Get-FMForestLevel) { |
148 | | - Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Executing.Invoke' -StringValues 'ForestLevel', $parameters.Server |
149 | | - Invoke-FMForestLevel @parameters |
150 | | - } |
151 | | - else { Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Skipping.Test.NoConfiguration' -StringValues 'ForestLevel' } |
152 | | - } |
153 | | - if ($newOptions -band [UpdateForestOptions]::ExchangeSchema) { |
154 | | - if (Get-FMExchangeSchema) { |
155 | | - Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Executing.Invoke' -StringValues 'ExchangeSchema', $parameters.Server |
156 | | - Invoke-FMExchangeSchema @parameters |
157 | | - } |
158 | | - else { Write-PSFMessage -Level Host -String 'Invoke-AdmfForest.Skipping.Test.NoConfiguration' -StringValues 'ExchangeSchema' } |
159 | | - } |
160 | 163 | } |
161 | 164 | catch { |
162 | 165 | Write-Error $_ |
|
0 commit comments