PowerShell-Docs icon indicating copy to clipboard operation
PowerShell-Docs copied to clipboard

Get-ControlPanelItem gives an error on PowerShell 7.4.2 on windows 11 home 23H2

Open KDAM71 opened this issue 2 years ago • 2 comments

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

KDAM71 avatar Jun 02 '24 17:06 KDAM71

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.

michaeltlombardi avatar Jun 03 '24 17:06 michaeltlombardi

I tested this locally. It worked for me. There is something wrong with your environment.

sdwheeler avatar Jun 03 '24 18:06 sdwheeler