Event banner
Windows Office Hours: October 17, 2024
Event Ended
Thursday, Oct 17, 2024, 08:00 AM PDTEvent details
Get answers to your questions about adopting Windows 11 and managing the Windows devices used by remote, onsite, and hybrid workers across your organization. Get tips on keeping devices up to date ef...
Heather_Poulsen
Updated Nov 19, 2024
Laser235
Oct 16, 2024Copper Contributor
Windows 11 24H2 has broken PowerShell commands running PowerShell with Invoke-Command, with Get-AppxPackage and other ways of running PowerShell with Get-AppxPackage fails with a new error message,
The type initializer for '<Module>' threw an exception.
+ CategoryInfo : NotSpecified: (:) [], TypeInitializationException
+ FullyQualifiedErrorId : System.TypeInitializationException
- EricMoeOct 17, 2024
Microsoft
Gary, you may need to open a support case. I am running Windows 11 24H2, opened a regular (non-elevated) PowerShell command prompt, and could run both invoke-command and get-appxpackage without errors. I opened an elevated PowerShell command prompt, and could run both invoke-command and get-appxpackage without any errors.