Skip to content

Commit

Permalink
hardcoded OU instead of injecting it via variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Thierry Delran committed Jan 24, 2024
1 parent bd4b629 commit 6b3140e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions DeadlineStack/workers_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6b3140e

Please sign in to comment.