I am trying to use a Powershell script to rename computers based on their serial numbers.
So far I have - Set-ExecutionPolicy -Unrestricted $name = (Get-WmiObject win32_bios).SerialNumber.Trim() Rename-Computer -NewName $name -DomainCredential \
I don't want this to prompt because I have a few thousand system to image and I would like this to just do the rename silently and then the MDT 2012 Update 1 will do the reboot.
I am a n00b when it comes to powershell and to scripting and I have spent the better part of a week trying to figure this out. I can get the rename to work locally with no problems but I am hoping I can get some help doing it silently.
I guess my question is, how do I put a password in my powershell script so I don't have to enter it at the workstation?