Closed KDAM71 closed 1 month ago
This repository is for documentation. You seem to be looking for support, which we can't provide here.
I suggest you try posting your issue with context in one of the available community support forums.
I tested this locally. It worked for me. There is something wrong with your environment.
Type of issue
Code doesn't work
Feedback
Using powershell with admin:
PowerShell 7.4.2 PS C:\Users\kdams> Get-ControlPanelItem Get-ControlPanelItem: Unable to cast COM object of type 'System.__ComObject' to interface type 'Shell32.Shell'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{286E6F1B-7113-4355-9562-96B7E9D64C54}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
Page URL
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-controlpanelitem?view=powershell-5.1
Content source URL
https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/5.1/Microsoft.PowerShell.Management/Get-ControlPanelItem.md
Author
@sdwheeler
Document Id
28b606f7-f971-f696-7f77-2926225bf83d