The immediate problem is that the spaces in C:\Program Files (x86)\Java\jre1.8.0_231 are causing PowerShell to be unable to interpret your input parameters. You should always wrap paths in quotes so that the shell doesn’t parse special characters and spaces:
Also, for the sake of safety when editing the registry, you should specify each parameter explicitly rather than using the shorthand method. Every tutorial about registry editing with PowerShell, and the documentation for Set-ItemProperty, shows the full parameter names being typed out.
Ok, the below ‘Set-ItemProperty’ command is working, but the registry change is not done in the registry for the AppVpackage rather in the normal window registry. How can I load the virtual registry appV package before the ‘Set-ItemProperty’ command?
Important On a 64-bit computer, the keys and values described in the following sections will be under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\SoftGrid\4.5\Client
I think the registry subkeys for the AppV client will be listed under that path, but I don't have an AppV environment to check it. You'll have to look through your own registry to verify.