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

Quick access to the registry for PowerShell drives

2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Windows PowerShell drives can make many tasks easier. For example, some of the most important entries in the Windows registry have very long paths, which are difficult to access and difficult to remember. The key configuration information is located in HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows\ CurrentVersion. To view and change the key in the CurrentVersion registry key, you can create a Windows PowerShell drive whose root is in the entry by typing:

New-PSDrive-Name cvkey-PSProvider Registry-Root HKLM\ Software\ Microsoft\ Windows\ CurrentVersion

# the output is as follows

''

Name Used (GB) Free (GB) Provider Root CurrentLocation

Cvkey Registry HKLM\ Software\ Microsoft\ Windows\...

''

# then, as with any other drive, you can change the location to cvkey: drive:

Cd cvkey:

Or:

Set-Location cvkey:-PassThru

New-PsDrive cmdlet only adds new drives to the current Windows PowerShell session. If you close the Windows PowerShell window, the new drive will be lost. To save the Windows PowerShell drive, use Export-Console cmdlet to export the current Windows PowerShell session and then use the PowerShell.exe PSConsoleFile parameter to import it. Alternatively, add a new drive to the Windows PowerShell configuration file.

You can also follow us for more information.

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: 362

*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