(When Windows won’t let you rename the computer)
TLDR:
WMIC computersystem where caption='CURRENT-PC-NAME' rename 'NEWPCNAME'
Couldn’t rename a Windows 11 computer through any of the normal processes. “Rename this PC” was grayed out everywhere. Tried a handful of different solutions, this was the one that finally did it.