MScholtes / PSVirtualDesktop

VirtualDesktop is a Powershell module that provides commandlets to manage virtual desktops of Windows 10.
MIT License
294 stars 18 forks source link

Windows 11 22H2 2261.2283 Breaks Functionality on v1.5.2 #33

Closed conner-s closed 10 months ago

conner-s commented 1 year ago

Synopsis

Updated my PC last night to Windows 11 22H2 22621.2283, went to run my work startup script this morning and the desktop switch errored out. Update-Module fixed my issue. This is the output from Switch-Desktop 1

VirtualDesktop.DesktopManager' threw an exception."
At C:\Program 
Files\WindowsPowerShell\Modules\VirtualDesktop\1.5.2\VirtualDesktop.ps1:1226 
char:4
+             $TempDesktop = [VirtualDesktop.Desktop]::FromIndex($Deskt ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : TypeInitializationException

Tried doing a Get-DesktopList and that returned

The type initializer for 'VirtualDesktop.DesktopManager' threw an exception.
At C:\Program
Files\WindowsPowerShell\Modules\VirtualDesktop\1.5.2\VirtualDesktop.ps1:1085   
char:16
+         for ($I = 0; $I -lt [VirtualDesktop.Desktop]::Count; $I++)
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], TypeInitializationExc  
   eption
    + FullyQualifiedErrorId : System.TypeInitializationException

Updating fixed my issue, may be worth calling out in the readme for users to run Update-Module if they experience any issues.

MScholtes commented 1 year ago

Hello @conner-s,

you are very demanding, you expect me to put a notice for an update that Microsoft delivered yesterday?

Do you mean something like https://github.com/MScholtes/PSVirtualDesktop#155-2023-09-02 or https://github.com/MScholtes/PSVirtualDesktop#154-2023-08-27? Or like most of the other issues?

But hey, thank you for your feedback.

Greetings

Markus

conner-s commented 1 year ago

My apologies, I wanted to bring it up as I experienced it and by no means meant it as a demand, I just wanted to suggest that documenting a procedure for the user to upgrade the module to fix potential issues would be beneficial in the readme. Is there a better way I could've worded that so that would've sounded less demanding?

MScholtes commented 10 months ago

No further activities required