diff --git a/Set-ComputerName.ps1 b/Set-ComputerName.ps1
index 9027e03..2619de9 100755
--- a/Set-ComputerName.ps1
+++ b/Set-ComputerName.ps1
@@ -11,7 +11,7 @@ $ComputerList = Import-Csv -Path "$scriptPath\$FileName"
# look up computer name by MAC address
ForEach ($Computer in $ComputerList) {
- Write-Host "$($Computer.CN) $($Computer.MAC) $thisComputerMac"
+ Write-Host "$($Computer.CN) $($Computer.MAC) $thisComputerMac"
If ($thisComputerMAC -match $Computer.MAC) {
Write-Host "$($Computer.CN) matches the localhost MAC Address: $thisComputerMAC"
$NewComputerName = $Computer.CN
@@ -24,6 +24,15 @@ If ($Null -eq $NewComputerName) {
$NewComputerName = Read-Host -Prompt "Please enter desired computer name then hit enter"
}
-# rename computer
+$cred = New-Object System.Management.Automation.PsCredential("SAWTOOTH\Administrator", (ConvertTo-SecureString "REPLACE_WITH_PASSWORD" -AsPlainText -Force))
+
+# rename computer and join to domain
Write-Host "Computer will be renamed to $NewComputerName."
-Rename-Computer -NewName $NewComputerName -Force -Verbose
\ No newline at end of file
+Rename-Computer -NewName $NewComputerName -Force -Verbose
+Add-Computer -Force -DomainName sawtooth.claremontmakerspace.org -Options JoinWithNewName -Credential $cred
+#Start-Sleep -Seconds 5
+#Restart-Computer
+
+# Install Salt
+# Write-Host "Installing Salt with minion name: $NewComputerName."
+# \\ucs\Software\Salt-Minion-2019.2.2-Py3-AMD64-Setup.exe /S /minion-name="$NewComputerName"
diff --git a/autounattend.xml b/autounattend.xml
index 8adb725..24ff5c5 100755
--- a/autounattend.xml
+++ b/autounattend.xml
@@ -124,30 +124,6 @@
*
W269N-WFGWX-YVC9B-4J6C9-T83GX
-
-
-
- sawtooth.claremontmakerspace.org
- REPLACE_WITH_PASSWORD
- administrator
-
- sawtooth.claremontmakerspace.org
-
-
-
-
-
-
-
- sawtooth.claremontmakerspace.org
- REPLACE_WITH_PASSWORD
- administrator
-
- 1
- powershell -File \\ucs.sawtooth.claremontmakerspace.org\Software\unattend\Set-ComputerName.ps1
-
-
-
@@ -161,20 +137,44 @@
1
-
-
-
- Administrators
- Administrator
-
- sawtooth.clarmontmakerspace.org
-
-
+
+
+
+ REPLACE_WITH_LOCAL_ADMIN_PASSWORD
+ true
+
+ Local Administrator
+ Local Administrator
+ Administrators;Power Users
+ LocalAdmin
+
+
false
Eastern Standard Time
+
+ true
+ 2
+ LocalAdmin
+
+ REPLACE_WITH_LOCAL_ADMIN_PASSWORD
+
+
+
+
+ net use \\ucs.sawtooth.claremontmakerspace.org\software /user:SAWTOOTH\Administrator REPLACE_WITH_PASSWORD
+ Set Up UCS Share
+ 1
+
+
+ powershell -NoExit -executionPolicy Bypass -File \\ucs.sawtooth.claremontmakerspace.org\Software\unattend\Set-ComputerName.ps1
+ Set Computer Name
+ 2
+ true
+
+