File tree Expand file tree Collapse file tree
Modules/ComputerManagementDsc/DSCResources/MSFT_Computer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -223,32 +223,32 @@ function Set-TargetResource
223223 }
224224 else
225225 {
226- $splat = @ {
226+ $addComputerParameters = @ {
227227 DomainName = $DomainName
228228 Credential = $Credential
229229 Force = $true
230230 }
231231 $rename = $false
232232 if ($Name -ne $env: COMPUTERNAME )
233233 {
234- $splat .Add (" NewName" , $Name )
234+ $addComputerParameters .Add (" NewName" , $Name )
235235 $rename = $true
236236 }
237237 if ($UnjoinCredential )
238238 {
239- $splat .Add (" UnjoinDomainCredential" , $UnjoinCredential )
239+ $addComputerParameters .Add (" UnjoinDomainCredential" , $UnjoinCredential )
240240 }
241241 if ($JoinOU )
242242 {
243- $splat .Add (" OUPath" , $JoinOU )
243+ $addComputerParameters .Add (" OUPath" , $JoinOU )
244244 }
245245 if ($Server )
246246 {
247- $splat .Add (" Server" , $Server )
247+ $addComputerParameters .Add (" Server" , $Server )
248248 }
249249
250250 # Rename the computer, and join it to the domain.
251- Add-Computer @splat
251+ Add-Computer @addComputerParameters
252252 if ($rename )
253253 {
254254 Write-Verbose - Message ($script :localizedData.RenamedComputerAndJoinedDomainMessage -f $Name , $DomainName )
You can’t perform that action at this time.
0 commit comments