'Rename remote machine, disable bitlocker for one reboot using Powershell

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.



Solution 1:[1]

manage-bde -protectors -disable c: is a batch command but works inside a powershell script as well. After one reboot, BL will re-enable automatically.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bernd Schwanenmeister