Wait for RPC Service before joining domain
This commit is contained in:
parent
99d31fa19c
commit
c309393ebc
@ -26,6 +26,9 @@ If ($Null -eq $NewComputerName) {
|
||||
|
||||
$cred = New-Object System.Management.Automation.PsCredential("SAWTOOTH\Administrator", (ConvertTo-SecureString "REPLACE_WITH_PASSWORD" -AsPlainText -Force))
|
||||
|
||||
Write-Host "Waiting for RPC Service"
|
||||
(Get-Service RpcSs).WaitForStatus("Running")
|
||||
|
||||
# rename computer and join to domain
|
||||
Write-Host "Computer will be renamed to $NewComputerName."
|
||||
Rename-Computer -NewName $NewComputerName -Force -Verbose
|
||||
|
@ -159,7 +159,7 @@
|
||||
</AutoLogon>
|
||||
<FirstLogonCommands>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>net use \\ucs.sawtooth.claremontmakerspace.org\software /user:SAWTOOTH\Administrator REPLACE_WITH_PASSWORD</CommandLine>
|
||||
<CommandLine>net use \\ucs\software /user:DomainJoin REPLACE_WITH_PASSWORD</CommandLine>
|
||||
<Description>Set Up UCS Share</Description>
|
||||
<Order>1</Order>
|
||||
</SynchronousCommand>
|
||||
|
Loading…
Reference in New Issue
Block a user