Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is the Windows Registry?
The Windows Registry is a database that stores settings and options for the operating system and installed programs. It helps Windows remember configurations like user preferences and system settings.
Click to reveal answer
beginner
How do you read a registry value using PowerShell?
Use the <code>Get-ItemProperty</code> cmdlet with the registry path. For example: <code>Get-ItemProperty -Path 'HKCU:\Software\MyApp' -Name 'Setting'</code> reads the 'Setting' value under 'MyApp' in the current user hive.
Click to reveal answer
beginner
How can you create a new registry key in PowerShell?
Use New-Item with the registry path. For example: New-Item -Path 'HKCU:\Software\MyNewApp' creates a new key named 'MyNewApp' under current user software.
Click to reveal answer
beginner
How do you set or change a registry value in PowerShell?
Use Set-ItemProperty with the path, name, and value. Example: Set-ItemProperty -Path 'HKCU:\Software\MyApp' -Name 'Setting' -Value 'NewValue' changes 'Setting' to 'NewValue'.
Click to reveal answer
beginner
What is the difference between HKCU and HKLM in the registry?
HKCU (HKEY_CURRENT_USER) stores settings for the logged-in user only. HKLM (HKEY_LOCAL_MACHINE) stores settings for all users on the computer.
Click to reveal answer
Which PowerShell cmdlet reads a registry value?
AGet-ItemProperty
BNew-Item
CSet-ItemProperty
DRemove-Item
✗ Incorrect
Get-ItemProperty reads values from registry keys.
What does HKLM stand for in the Windows Registry?
AHKEY_LOCAL_MACHINE
BHKEY_LOCAL_MEMORY
CHKEY_LOGGED_MACHINE
DHKEY_LOCAL_MODULE
✗ Incorrect
HKLM means HKEY_LOCAL_MACHINE, storing settings for all users.
Which cmdlet creates a new registry key?
ASet-ItemProperty
BGet-ItemProperty
CRemove-ItemProperty
DNew-Item
✗ Incorrect
New-Item creates new keys or folders in the registry.
To change a registry value, which cmdlet should you use?
AGet-ItemProperty
BNew-Item
CSet-ItemProperty
DRemove-Item
✗ Incorrect
Set-ItemProperty changes or sets registry values.
Which registry hive stores settings specific to the current user?
AHKLM
BHKCU
CHKCR
DHKU
✗ Incorrect
HKCU stands for HKEY_CURRENT_USER, storing user-specific settings.
Explain how to read, create, and modify registry keys and values using PowerShell.
Think about the cmdlets for reading, creating, and setting registry data.
You got /4 concepts.
Describe the difference between HKCU and HKLM registry hives and when you might use each.
Consider who the settings affect: one user or all users.
You got /4 concepts.
Practice
(1/5)
1. What PowerShell cmdlet is used to read a value from the Windows registry?
Using New-Item or Remove-Item which manage keys, not values
Trying to read with Remove-Item
2. Which of the following is the correct syntax to set a registry value named TestValue to 123 under HKCU:\Software\MyApp?
easy
A. Get-ItemProperty -Path 'HKCU:\Software\MyApp' -Name 'TestValue' -Value 123
B. Set-ItemProperty -Path 'HKCU:\Software\MyApp' -Value 'TestValue' -Name 123
C. Set-ItemProperty -Path 'HKCU:\Software\MyApp' -Name 'TestValue' -Value 123
D. New-Item -Path 'HKCU:\Software\MyApp' -Name 'TestValue' -Value 123
Solution
Step 1: Identify correct cmdlet and parameters
Set-ItemProperty sets a registry value. The parameters are -Path for key, -Name for value name, and -Value for the data.
Step 2: Check parameter order and names
Set-ItemProperty -Path 'HKCU:\Software\MyApp' -Name 'TestValue' -Value 123 correctly uses -Path, -Name, and -Value in proper order. Other options mix parameters or use wrong cmdlets.
Final Answer:
Set-ItemProperty -Path 'HKCU:\Software\MyApp' -Name 'TestValue' -Value 123 -> Option C