I have the following line of code in a larger script which works beautifully.
intReturn = objShell.Run("cmd /k powershell Rename-Computer -ComputerName " & txt_oldname.Value & " -NewName " & sNewName & " -DomainCredential MyDomain\" & txt_admname.Value & " -Force -PassThru")
There is one slight tweak I would like to acomplish but not sure how/possible? I have a variable that stores the password as well " & txt_admpass.Value & " What would the code look like if I worked this in so that it would not ask for the password again? Thanks!