Hi everybody
I made a little script to rename computers (windows 7 Pro), and it works, is very simple
first i create a file .CSV with the oldname and newname
then, im using the following lines is how i change the pc name
$a = Import-Csv ServerNames.csv -Header OldName, NewName
Foreach ( $Server in $a ) {Rename-Computer -ComputerName $Server.OldName -NewName $Server.NewName -LocalCredential localhost\localuser -DomainCredential Domain\UserDomain -Force -Restart}
but i need write the psw in the powershell credential window, with each of the computers and my question, is possible to add the psw for the localuser and the domainuser in the script to avoid write it?
sorry for the noob question
thanks in advance