what does this do? $isBroken = 0 Define the root registry path $ShellRegRoot =…
- User
what does this do? $isBroken = 0
# Define the root registry path $ShellRegRoot = 'HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell' $bagMRURoot = $ShellRegRoot + '\BagMRU' $bagRoot = $ShellRegRoot + '\Bags' # Define the target GUID tail for MSGraphHome $HomeFolderGuid = '14001F400E3174F8B7B6DC47BC84B9E6B38F59030000' $properties = Get-ItemProperty -Path $bagMRURoot foreach ($property in $properties.PSObject.Properties) { if ($property.TypeNameOfValue -eq 'System.Byte[]') { $hexString = ($property.Value | ForEach-Object { $_.ToString('X2') }) -join '' if ($hexString -eq $HomeFolderGuid) { $subkey = $property.Name $nodeSlot = Get-ItemPropertyValue -Path ($bagMRURoot + '\' + $subkey) -Name 'NodeSlot' $isBroken = if ((Get-ItemPropertyValue -Path ($bagRoot + '\' + $nodeSlot + '\Shell\*') -Name 'GroupView') -eq 0) { 1 } else { 0 } break } } }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.