For example, to create a sub - key called test
under the key MSExchangeIS , use the following command:
[PS] C:\ > New-Item -Path HKLM:\SYSTEM\CurrentControlSet\Services\MSExchangeIS\
-ItemType key -Name test
Hive: Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentC
ontrolSet\Services\MSExchangeIS
SKC VC Name Property
--- -- ---- --------
0 0 test {}
To remove this key use the Remove-Item cmdlet followed by the Path parameter to specify the full path
to the item to be removed:
[PS] C:\ > remove-Item -Path HKLM:\SYSTEM\CurrentControlSet\Services\MSExchangeIS\
Test
Be very careful when using this command because it would be very easy to delete the wrong key from the Registry
by entering in an incomplete path. There is no confirmation to prevent you from deleting the wrong value and there
is no feedback to report the exact action that was taken.
Chapter 2: Using Exchange Management Shell
59
To see the property values a key contains, use the Get-ItemProperty cmdlet followed by the Path
parameter specifying the path to the key containing the values, and the Name parameter to specify the
name of the property. If the current location is the key containing the value, use dot sourcing ( .\ ) to
specify the current location. By omitting the Name parameter, all property values for the key are returned.
Pages:
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114