PowerShell Logo Small

Set-Location



This is the built-in help made by Microsoft for the command 'Set-Location', in PowerShell version 2 - as retrieved from Windows version 'Microsoft® Windows Vista™ Ultimate ' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Sets the current working location to a specified location.

SYNTAX


Set-Location [-LiteralPath] <string> [-PassThru] [-UseTransaction] [<CommonParameters>]
Set-Location [[-Path] <string>] [-PassThru] [-UseTransaction] [<CommonParameters>]
Set-Location [-StackName <string>] [-PassThru] [-UseTransaction] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Set-Location cmdlet sets the working location to a specified location. That location could be a directory, a sub-directory, a registry locati
on, or another location stack.



<

RELATED LINKS

Online version: http://go.microsoft.com/fwlink/?LinkID=113397
about_Providers
Get-Location
Pop-Location
Push-Location

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

C:\PS>set-location HKLM:



Description
-----------
This will set the current location to the one specified; in this case, it is the HKLM provider.








-------------------------- EXAMPLE 2 --------------------------

C:\PS>set-location env: -passthru

Path
----
Env:\



Description
-----------
This will set the current location to the one specified; in this case, it is the environment variable provider.








-------------------------- EXAMPLE 3 --------------------------

C:\PS>set-location C:



Description
-----------
This will set the current location to the one specified; in this case, it is the C: drive in the file system provider.