minor rearranging
This commit is contained in:
@@ -9,11 +9,11 @@ $CompName = $env:COMPUTERNAME
|
||||
$ADCompOU = ([adsisearcher]"(&(objectClass=computer)(sAMAccountName=$CompName$))").FindOne().GetDirectoryEntry().distinguishedName
|
||||
$PCNamePrefix = ($CompName.Substring(0,$CompName.IndexOf("-")))
|
||||
$PCNameSuffix = ($CompName.Substring($CompName.IndexOf("-")+1))
|
||||
# Domain Credentials to be used
|
||||
. "\\berrypunch.technolog.net\PSCredentials$\Credentials-WKSDeploy.ps1"
|
||||
|
||||
Function RenamePCTNGPrefix {
|
||||
Write-Host "Renaming this computer to TNG-$PCNameSuffix."
|
||||
# Domain Credentials to be used
|
||||
. "\\berrypunch.technolog.net\PSCredentials$\Credentials-WKSDeploy.ps1"
|
||||
Rename-Computer -NewName "TNG-$PCNameSuffix" -DomainCredential $DomainCredential -Restart
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user