I have a code:
$x = Invoke-AzVMRunCommand -ResourceGroupName 'testrg1' -Name 'sqlvm1'-CommandId 'RunPowerShellScript' -ScriptPath 'C:\Users\joe\OneDrive - Microsoft\Documents\joe\Miscellaneous\run_sqlserver_script.ps1' -Parameter @{"VmName" = 'sqlvm1'}
I want the stuff in the Message to be in an array so that I can access each value. But right now $x.Value[0].Message.gettype() is a String. When I run $x.Value[0].Message.ComputerName nothing shows up. How do I convert the stuff in the Message from String to Array?