-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkers_windows.ps1
23 lines (17 loc) · 1 KB
/
workers_windows.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# secret ARN - StudioADAdminAccountCredentials...
$secret=""
# Fsx drive DNS name
$drive=""
# Write-Output "forcing deadline connection"
$DEADLINE_PATH = "C:\Program Files\Thinkbox\Deadline10\bin"
pushd $DEADLINE_PATH
.\deadlinecommand.exe -SetIniFileSetting ProxyRoot0 renderqueue.deadline.internal:4433
.\deadlinecommand.exe -SetIniFileSetting ProxyRoot renderqueue.deadline.internal:4433
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
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
popd