To change the directory in PowerShell, you use the Set-Location cmdlet. For example, to change your home directory, you would type "Set-Location ~".