Various registry functions, such as:
#Configuration
$registrypath = "HKLM:\Software\TrendMicro\PC-cillinNTCorp\CurrentVersion\Misc"
$name = "VDIEnabled"
$value = "1"
# Test that a registry path exists and create a key in the location
if (!(Test-Path $registrypath))
{
New-Item -Path $registrypath -Force | out-null
New-ItemProperty -Path $registrypath -Name $name -Value $value -PropertyType DWORD -Force #| out-null
} else {
New-ItemProperty -Path $registrypath -Name $name -Value $value -PropertyType DWORD -Force #| out-null
}