It is possible to query the registry of a machine using a Script action, however the user was getting ‘access denied’ errors. If the computer runs the CU agent, it might be easier to run the script there instead of remotely. It was suggested that PS remote needs to be enabled for Invoke-Commands. 8.8 release will allow users to see the value for VHDLocations as a column in console and Solve as part of the FSLogix integration.
Read the entire ‘Querying the Registry of a Machine Using Script Action’ thread below:
Is it possible to remotely query the registry of machine using a Script action? I’m getting access denied. not sure if it has something to do with the Contorlup Service account we are using or if it is a limitation. The command i’m using: Invoke-Command -Computer $machine -ScriptBlock {Get-ItemProperty -Path: HKLM:\SOFTWARE\Policies\FSLogix\ODFC -Name "VHDLocations"}
Does $computername run the CU agent as well? Might be easier to run it directly on that machine without remoting.
Unless otherwise configured a script action runs as system. Which you can control.

i think you need to have PS remote enabled to rune invuke-commands remotly
FYI – The value for VHDLocations for ODFC containers is in the 8.8 release as a column FYI. One less requirement on you, you will be able to see this side by side in console & Solve. All part of the bigger FSLogix integration coming in a few weeks. 😉
Continue reading and comment on the thread ‘How to remotely query the registry of machine using a ControlUp Script Action?’. Not a member? Join Here!
Categories: All Archives, ControlUp Scripts & Triggers
