Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the use of Set-Location?

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail what the usage of Set-Location is, and the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Now we know how to use Get-Help to view aliases for dir and cd-let's see what we can do with cd, which is an alias for Set-Location

We can browse our file system with the cd command. Why not browse our registry? Environmental variables? Certificate store? Even Active Directory?

Let's see how we can navigate to our registry:

Cd hklm:-bring us to HKEY_LOCAL_MACHINEcd hkcu:-bring us to HKEY_CURRENT_USER

There we can use dir or Get-ChildItem to view the content there.

Or let Set-Location (cd) enter our environment variable:

To get back to our file system, all we need is cd c:

How can we know the location of Set-Location?

Through GET- PSDrive and get a list of them:

GET-PSDrive

If we want to create a new PSDrive, then there is another cmd-let:New-PSDrive for us to make one, and we change "c:\ program files" to pf:filesystem PSDrive:

New-PSDrive pf file system "C:\ Program Files"-this can also be the UNC path

To delete PSDrive, simply delete "Program Files" using Remove-PSDrive

Note: delete-PSDrive pf-No ":"

Now do the following in the registry performed in the file system:

I will go into hkcu: and create a key called IEkey

So much for sharing about the usage of Set-Location. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report