cancel
Showing results for 
Search instead for 
Did you mean: 

Utility PowerShell Compiler Error since Development platform Maintenance update

Kirk.Russell
Level 6

Hi All

My PowerShell utility is showing a compiler error in my Development platform workers since the routine BP Maintenance 2nd Thursday windows updates this morning.

PowerShell.exe was updated as part of this - and maybe first update since upgrading the VMs to W11.

I checked on the Digital Exchange and saw Utility PowerShell 1.4.0 release stating Utility PowerShell 7 is needed for W11 - so imported and tried that on the Run Script action, but getting the same compiler error:

Description: Compiler error at top section line -11: Metadata file 'C:\Windows\assembly\GAC_MSIL\System.Management.Automation\1.0.0.0__31bf3856ad364e35\System.Management.Automation.dll' could not be found

Anyone else getting this error?

My Production version continues to work okay on an older PowerShell.exe, but I am concerned this will also stop working after the routine 3rd Thursday windows Maintenance next week

Thanks

Kirk

 

3 REPLIES 3

Kirk.Russell
Level 6

Apologies that was the compiler error for the original utility, the Utility for PowerShell v7 is showing the following:

Compiler error at top section line -11: Metadata file 'C:\Windows\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll' could not be found for the dll referenced: 

KirkRussell_0-1757600259775.png

 

aswingler
Level 2

Hi Kirk

 

I am getting the same error, Any luck resolving

Hello

Yes I did, a colleague in a different chat reached out after having the same issue and pointed out a simple resolution. 

We weren't able to get it working for the newer Utility PowerShell 7 object, but because the issue hit the Development workers first, both still had copies of the folder and associated dll that seem to get removed by the windows update - and were able to copy back from our Production workers to the Development workers.... and then back into the Production workers when the updates wiped the folder out there the following week.

So the windows update is removing the following folder:

C:\Windows\assembly\GAC_MSIL\System.Management.Automation

with subfolder:

C:\Windows\assembly\GAC_MSIL\System.Management.Automation\1.0.0.0__31bf3856ad364e35

which contains the dll:

C:\Windows\assembly\GAC_MSIL\System.Management.Automation\1.0.0.0__31bf3856ad364e35\System.Management.Automation.dll

Although the latest version of the PowerShell Utility on the DX says that the Utility PowerShell 7 is required in W11 for the preferred version of PowerShell, the older version "Utility PowerShell" seems to be working fine with the folders and dll put back on the W11 workers.

If you have lost the folder and dll from workers on both platforms I can try to send you a zip with them on to re-install.

I guess my original post on here was partly querying why the windows update is removing this folder and is there anything else we need to be doing rather than this copying the folder and dll back to the workers?

Also is the dll the same for both the older and newer versions of the PowerShell Utility and can I simply create the folder "v4.0_3.0.0.0__31bf3856ad364e35" in the System.Management.Automation folder and add the same dll in to get the newer W11 version of the PowerShell Utility working as well? Or is it a different dll? Haven't had time to test this yet.

Regards

Kirk