From 6b3140ef8db76ab48a39324028d73053bb9d7265 Mon Sep 17 00:00:00 2001 From: Thierry Delran Date: Wed, 24 Jan 2024 16:01:36 +0100 Subject: [PATCH] hardcoded OU instead of injecting it via variable --- DeadlineStack/workers_windows.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DeadlineStack/workers_windows.ps1 b/DeadlineStack/workers_windows.ps1 index 386ce11..088a5bc 100644 --- a/DeadlineStack/workers_windows.ps1 +++ b/DeadlineStack/workers_windows.ps1 @@ -13,8 +13,7 @@ Write-Output "Adding computer to domain" $adInfo = Get-SECSecretValue -SecretId $secret | Select-Object -ExpandProperty SecretString | ConvertFrom-Json $credential = New-Object -TypeName PSCredential -ArgumentList ($adInfo.username + '@' + $adInfo.fqdn),(ConvertTo-SecureString -String $adInfo.password -AsPlainText -Force)[0] $username = $adInfo.fqdn+"\"+$adInfo.username -$ouPath = "OU=RenderWorkers,OU=ad" -Add-Computer -DomainName $adInfo.fqdn -Credential $credential -OUPath $ouPath -Restart +Add-Computer -DomainName $adInfo.fqdn -Credential $credential -OUPath "OU=RenderWorkers,OU=ad" -Restart # Write-Output "Mounting fsx drive" # New-PSDrive -Name "Z" -Root ("\\"+$drive+"\share") -Persist -PSProvider "FileSystem" -Credential $credential