RegistryKey (RegKey): Unterschied zwischen den Versionen

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche
 
(kein Unterschied)

Aktuelle Version vom 6. Mai 2020, 08:40 Uhr


Add or update a MultiString "REG_MULTI_SZ" RegKey

For example: Add an MultiString-RegKey Named Environment with the following Value:

ClusterName = Cluster01
Environment = Test

Under the Reg-Path HKLM:\SYSTEM\CurrentControlSet\Services\telegraf. (Environment Variables for the Service "Telegraf")

$RegKeyValue =@(
"ClusterName=Cluster01",
"Environment=Test"
)
 
# Create or update the RegKey "Environment" with the Variables
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\telegraf" -Name "Environment" -Value $RegKeyValue -PropertyType "MultiString" -Force