Set-Location

Set the current PowerShell working location.

Syntax
Set-Location [[-path] string] [-passThru]
[-UseTransaction] [CommonParameters]
Set-Location [-literalPath] string] [-passThru]
[-UseTransaction] [CommonParameters]
Set-Location [-stackName string] [-passThru]
[-UseTransaction] [CommonParameters]
Key
-path string
The path to a new working location.
-literalPath string
Like Path above, only the value is used exactly as typed.
No characters are interpreted as wildcards. If the path includes any
escape characters then enclose the path in single quotation marks.
-stackName
The stack to which the location is being set.
-passThru
Pass the object created by this cmdlet through the pipeline.
-UseTransaction
Include the command in the active transaction.
CommonParameters:
-Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable,
-OutBuffer -OutVariable.

The CMD shell's working directory does not automatically follow the current location of PowerShell for security reasons, older command-line applications may try to load certain DLLs from the current directory.

“The three most important factors in buying a home are, location, location, location!”

Related:

Get-Location - Get and display the current location
Pop-Location - Set the current working location (from the stack)
Push-Location - Push a location to the stack
Equivalent bash command: cd - Change Directory