PSParentPath : \Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows PSPath : \Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion Get-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion -Name DevicePath Name parameter to specify the name of the DevicePath entry. Using Get-ItemProperty, use the Path parameter to specify the name of the key, and the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion. This example finds the value of DevicePath in If you want to retrieve a specific entry in a registry key, you can use one of several possibleĪpproaches. The ItemProperty listing for HKLM:\SOFTWARE\Microsoft\Windows\Help using Path expansion works the same as it does within the filesystem, so from this location you can get Specifying a full path: Get-ItemProperty -Path. notation for the current location to list the properties without You can use Set-Location toĬhange to the CurrentVersion registry container first: Set-Location -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersionĪlternatively, you can use the built-in HKLM: PSDrive with Set-Location: Set-Location -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion You can use the *.* notation for referring to the current location. PSPath, PSParentPath, PSChildName, and PSProvider. The Windows PowerShell-related properties for the key are all prefixed with "PS", such as PSParentPath : \Registry::HKEY_LOCAL_MACHINE\SOFTWA PSPath : \Registry::HKEY_LOCAL_MACHINE\SOFTWA SM_ConfigureProgramsName : Set Program Access and Defaults ProgramFilesDir (x86) : C:\Program Files (x86)ĬommonFilesDir (x86) : C:\Program Files (x86)\Common FilesĬommonW6432Dir : C:\Program Files\Common Files ![]() ![]() To view the registry entries in a more readable form, use Get-ItemProperty: Get-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersionĬommonFilesDir : C:\Program Files\Common Files List: Get-Item -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion | Theįollowing command selects the Property property and expands the items so that they're displayed in a Property with the generic name of "Property" that's a list of registry entries in the key. HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion, use Get-Item. For example, to see the names of the entries in the registry key There are many different ways to examine registry entries. ![]() Take a slightly different approach when working with them. This sample only applies to Windows platforms.īecause registry entries are properties of keys and, as such, can't be directly browsed, we need to
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |