0

#PSTip Use Push-Location to save your current location

Going through folders, you sometimes find yourself in some strangely named ones you are sure you’ll have to revisit again. To avoid searching for the folders after some digging around,  use the pushd (Push-Location) command to save your current location to stack.

PS C:\Windows\System32\DriverStore\FileRepository\brmfcmdm.inf_x86_neutral_3b38c2e8e6f06c1b> pushd

Or to save the location and go one folder up in the folder structure do:

PS C:\Windows\System32\DriverStore\FileRepository\brmfcmdm.inf_x86_neutral_3b38c2e8e6f06c1b> pushd ..

Now you can dig around how you want. For example go check the driver setup logs in the inf folder. After you are finished, use popd (Pop-Location) to go back to where you were.

PS C:\windows\inf> popd
PS C:\Windows\System32\DriverStore\FileRepository\brmfcmdm.inf_x86_neutral_3b38c2e8e6f06c1b>
Filed in: Columns, Tips and Tricks Tags: ,

Leave a Reply

Submit Comment

© 2016 PowerShell Magazine. All rights reserved. XHTML / CSS Valid.
Proudly designed by Theme Junkie.
%d bloggers like this: