What would be the best way to use powershell to script this scenario? We have a few machines that we need to rename, disable bitlocker for one reboot, reboot? Its not many and I want to improve my powershell chops. This is what I have so far:
$OldName = Read-Host 'What is the hostname of the machine you want to rename?'
$NewName = Read-Host 'What would you like to rename the machine to?'
Read-Host -Prompt "This will reboot the remote machine! Press any key to continue or CTRL+C to quit"
$cred = get-credential
Rename-Computer -ComputerName "$OldName" -NewName "$NewName" -DomainCredential $cred -Restart
I wasn't sure if I could pipe to suspend bitlocker 1 reboot, or whats the best command for a remote machine. I know you can use a .csv list for a bunch of machines, but this is not that many.