How to change a network to private on Windows (and how to rename it)

Make a public connection private (source):

Set-NetConnectionProfile -InterfaceAlias <interface name> -NetworkCategory Private

Rename the adapter (source):

Get-NetAdapter -Name Ethernet | Rename-NetAdapter -NewName Renamed

I’m posting this so I can find it again next time I forget