It seems the PowerShell Core 7.5.0 update will install itself as an update over PowerShell 7.4.x. Right now the PMPC PowerShell 7.4 LTS is 7.4.7.0, and I tried multiple times across different computers and it's consistent in the behavior that it upgrades it to the 7.5. It feels like the install for 7.5 itself might be broken, but I also do not think it should detect and upgrade from 7.4.
for us this is all Intune only managed no SCCM.
For our environment this actually breaks PowerShell 7, it will not load, it opens, fills the screen with this, pauses for a few and then closes.
Using my test VM I installed the PMPC 7.4 version and then made the update available for my computer and ran it via company portal so I could recreate logs.
PowerShell 7.5.0
Same behavior on Windows 10 and 11.
PatchMyPC-SoftwareDetectionScript.log
PatchMyPC-ScriptRunner.log
for us this is all Intune only managed no SCCM.
For our environment this actually breaks PowerShell 7, it will not load, it opens, fills the screen with this, pauses for a few and then closes.
Using my test VM I installed the PMPC 7.4 version and then made the update available for my computer and ran it via company portal so I could recreate logs.
PowerShell 7.5.0
Code Select
Fatal error. Internal CLR error. (0x80131506)
at System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle, System.RuntimeTypeHandle[])
at A.E.d(System.RuntimeMethodHandle[])
at A.a.D(A, System.String, System.Type, System.Reflection.MethodBase, Boolean)
at A.a.B(System.Reflection.Assembly, A)
at A.a.a(System.Reflection.Assembly)
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at System.Management.Automation.Runspaces.PSSnapInHelpers.GetAssemblyTypes(System.Reflection.Assembly, System.String)
at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzeModuleAssemblyWithReflection(System.Reflection.Assembly, System.String, System.Management.Automation.PSSnapInInfo, System.Management.Automation.PSModuleInfo, System.String, System.Collections.Generic.Dictionary`2<System.String,System.Management.Automation.Runspaces.SessionStateCmdletEntry> ByRef, System.Collections.Generic.Dictionary`2<System.String,System.Collections.Generic.List`1<System.Management.Automation.Runspaces.SessionStateAliasEntry>> ByRef, System.Collections.Generic.Dictionary`2<System.String,System.Management.Automation.Runspaces.SessionStateProviderEntry> ByRef)
at System.Management.Automation.Runspaces.PSSnapInHelpers.AnalyzePSSnapInAssembly(System.Reflection.Assembly, System.String, System.Management.Automation.PSSnapInInfo, System.Management.Automation.PSModuleInfo, System.Collections.Generic.Dictionary`2<System.String,System.Management.Automation.Runspaces.SessionStateCmdletEntry> ByRef, System.Collections.Generic.Dictionary`2<System.String,System.Collections.Generic.List`1<System.Management.Automation.Runspaces.SessionStateAliasEntry>> ByRef, System.Collections.Generic.Dictionary`2<System.String,System.Management.Automation.Runspaces.SessionStateProviderEntry> ByRef, System.String ByRef)
at System.Management.Automation.Runspaces.InitialSessionState.ImportCmdletsFromAssembly(System.Reflection.Assembly, System.Management.Automation.PSModuleInfo)
at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(System.Management.Automation.PSModuleInfo, System.String, System.String, System.Reflection.Assembly, System.String, System.Management.Automation.SessionState, ImportModuleOptions, ManifestProcessingFlags, System.String, Boolean ByRef, System.String, Boolean)
at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(System.Management.Automation.PSModuleInfo, System.String, System.String, System.String, System.Management.Automation.SessionState, System.Object, ImportModuleOptions ByRef, ManifestProcessingFlags, Boolean ByRef, Boolean ByRef)
at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModuleNamedInManifest(System.Management.Automation.PSModuleInfo, Microsoft.PowerShell.Commands.ModuleSpecification, System.String, Boolean, System.String, System.Management.Automation.SessionState, ImportModuleOptions, ManifestProcessingFlags, System.Object, Boolean ByRef, System.String, System.Nullable`1<System.Management.Automation.PSLanguageMode>)
at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModuleManifest(System.String, System.Management.Automation.ExternalScriptInfo, System.Collections.Hashtable, System.Collections.Hashtable, ManifestProcessingFlags, System.Version, System.Version, System.Version, System.Nullable`1<System.Guid>, ImportModuleOptions ByRef, Boolean ByRef)
at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(System.Management.Automation.PSModuleInfo, System.String, System.String, System.String, System.Management.Automation.SessionState, System.Object, ImportModuleOptions ByRef, ManifestProcessingFlags, Boolean ByRef, Boolean ByRef)
at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadUsingExtensions(System.Management.Automation.PSModuleInfo, System.String, System.String, System.String, System.String, System.String, System.Management.Automation.SessionState, ImportModuleOptions, ManifestProcessingFlags, Boolean ByRef, Boolean ByRef)
at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadUsingModulePath(System.Management.Automation.PSModuleInfo, System.Collections.Generic.IEnumerable`1<System.String>, System.String, System.Management.Automation.SessionState, ImportModuleOptions, ManifestProcessingFlags, System.Management.Automation.PSModuleInfo ByRef)
at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName(ImportModuleOptions, System.String)
at Microsoft.PowerShell.Commands.ImportModuleCommand.ImportModule_LocallyViaName_WithTelemetry(ImportModuleOptions, System.String)
at Microsoft.PowerShell.Commands.ImportModuleCommand.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
at System.Management.Automation.CommandProcessorBase.DoExecute()
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(System.Object)
at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()
at System.Management.Automation.Runspaces.PipelineThread.WorkerProc()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
Same behavior on Windows 10 and 11.
PatchMyPC-SoftwareDetectionScript.log
Code Select
01/27/2025 08:18:34~[PowerShell 7-x64 {d0525a30-046b-435e-914a-781b23f476ed} 7.4.7.0]~[Found:False]~[Purpose:Detection]~[Context:COMPUTERNAMEWASHERE$)]~[Hive:HKLM:\software\microsoft\windows\currentversion\uninstall\*]
01/27/2025 08:19:02~[PowerShell 7-x64 {d0525a30-046b-435e-914a-781b23f476ed} 7.4.7.0]~[Found:False]~[Purpose:Detection]~[Context:COMPUTERNAMEWASHERE$)]~[Hive:HKLM:\software\microsoft\windows\currentversion\uninstall\*]
01/27/2025 08:20:03~[PowerShell 7-x64 {d0525a30-046b-435e-914a-781b23f476ed}]~[Found:True]~[Purpose:Detection]~[Context:COMPUTERNAMEWASHERE$)]~[Hive:HKLM:\software\microsoft\windows\currentversion\uninstall\*]
01/27/2025 08:42:24~[PowerShell 7-x64 {d0525a30-046b-435e-914a-781b23f476ed}]~[Found:True]~[Purpose:Detection]~[Context:COMPUTERNAMEWASHERE$)]~[Hive:HKLM:\software\microsoft\windows\currentversion\uninstall\*]
PatchMyPC-SoftwareUpdateDetectionScript.log entries
01/27/2025 08:42:26~[PowerShell 7-x64 {d012dcd1-67ea-4627-938f-19fd677fc03a} 7.5.0]~[Found:False]~[Purpose:Detection]~[Context:COMPUTERNAMEWASHERE$)]~[Hive:HKLM:\software\microsoft\windows\currentversion\uninstall\*]
01/27/2025 08:42:28~[PowerShell 7-x64 7.5.0]~[Found:True]~[Purpose:Requirement]~[Context:COMPUTERNAMEWASHERE$)]~[Hive:HKLM:\software\microsoft\windows\currentversion\uninstall\*]
01/27/2025 08:42:48~[PowerShell 7-x64 {d012dcd1-67ea-4627-938f-19fd677fc03a} 7.5.0]~[Found:False]~[Purpose:Detection]~[Context:COMPUTERNAMEWASHERE$)]~[Hive:HKLM:\software\microsoft\windows\currentversion\uninstall\*]
01/27/2025 08:44:14~[PowerShell 7-x64 {d012dcd1-67ea-4627-938f-19fd677fc03a}]~[Found:True]~[Purpose:Detection]~[Context:COMPUTERNAMEWASHERE$)]~[Hive:HKLM:\software\microsoft\windows\currentversion\uninstall\*]
PatchMyPC-ScriptRunner.log
Code Select
========================================================================================= ScriptRunner 1/27/2025 8:19:03 AM 1 (0x0001)
Starting ScriptRunner (V2.1.29.0) with 1 argument(s) ScriptRunner 1/27/2025 8:19:04 AM 1 (0x0001)
Current culture info name is: en-US ScriptRunner 1/27/2025 8:19:04 AM 1 (0x0001)
Running as NT AUTHORITY\SYSTEM (Admin) ScriptRunner 1/27/2025 8:19:04 AM 1 (0x0001)
Working directory: C:\WINDOWS\IMECache\63004b80-8085-4e9b-a8f8-b7c51ec968da_1 ScriptRunner 1/27/2025 8:19:04 AM 1 (0x0001)
System path is C:\WINDOWS\System32 ScriptRunner 1/27/2025 8:19:04 AM 1 (0x0001)
Argument #1 is: /InstallPackage Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Inspects argument: installpackage Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Installation mode requested Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
App installation mode requested. ScriptRunner 1/27/2025 8:19:04 AM 1 (0x0001)
Ready to install: [Microsoft Corporation] - [PowerShell 7.4 LTS (MSI-x64)] - [7.4.7.0] ScriptRunner 1/27/2025 8:19:04 AM 1 (0x0001)
Command-Line argument for Script-Runner is: /MainFile=PowerShell-7.4.7-win-x64.msi.."/MainArg=ALLUSERS=1 REBOOT=ReallySuppress".."/LoggingSwitch=/l {path}"../LoggingPath=%ProgramData%\Microsoft\IntuneManagementExtension\Logs\Software../LogRetentionDays=28 ScriptRunner 1/27/2025 8:19:04 AM 1 (0x0001)
Argument #1 is: /MainFile=PowerShell-7.4.7-win-x64.msi Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Inspects argument: mainfile=powershell-7.4.7-win-x64.msi Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
MainFile is: PowerShell-7.4.7-win-x64.msi Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Argument #2 is: "/MainArg=ALLUSERS=1 REBOOT=ReallySuppress" Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Inspects argument: mainarg=allusers=1 reboot=reallysuppress Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
MainArg is: ALLUSERS=1 REBOOT=ReallySuppress Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Argument #3 is: "/LoggingSwitch=/l {path}" Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Inspects argument: loggingswitch=/l {path} Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Logging switch is: /l {path} Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Argument #4 is: /LoggingPath=%ProgramData%\Microsoft\IntuneManagementExtension\Logs\Software Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Inspects argument: loggingpath=%programdata%\microsoft\intunemanagementextension\logs\software Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Logging path is: C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\Software Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Argument #5 is: /LogRetentionDays=28 Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Inspects argument: logretentiondays=28 Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Days to retain logs is: 28 Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Full logging path is: C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\Software\PowerShell-7.4.7-win-x64.msi.log Arguments 1/27/2025 8:19:04 AM 1 (0x0001)
Checking if MsiExec is available to perform an installation/uninstallation task ScriptRunner 1/27/2025 8:19:04 AM 1 (0x0001)
MsiExec is available. ScriptRunner 1/27/2025 8:19:04 AM 1 (0x0001)
Looking if application installation process need to be aborted due to running process ScriptRunner 1/27/2025 8:19:04 AM 1 (0x0001)
No need to abort due to the running processes ScriptRunner 1/27/2025 8:19:04 AM 1 (0x0001)
Running application install: PowerShell-7.4.7-win-x64.msi with arguments: ALLUSERS=1 REBOOT=ReallySuppress /l C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\Software\PowerShell-7.4.7-win-x64.msi.log PerfTimerLogger 1/27/2025 8:19:04 AM 1 (0x0001)
Installation file has run, exit code is: 0 ScriptRunner 1/27/2025 8:19:43 AM 1 (0x0001)
Running application install: PowerShell-7.4.7-win-x64.msi with arguments: ALLUSERS=1 REBOOT=ReallySuppress /l C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\Software\PowerShell-7.4.7-win-x64.msi.log finished with Elapsed Time: 00 minutes 39 seconds 602 milliseconds PerfTimerLogger 1/27/2025 8:19:44 AM 1 (0x0001)
Cleaning up Notification RegKey ScriptRunner 1/27/2025 8:19:46 AM 1 (0x0001)
Cleaning up Notification folder ScriptRunner 1/27/2025 8:19:46 AM 1 (0x0001)
End of installation. Exit code is: 0 ScriptRunner 1/27/2025 8:19:46 AM 1 (0x0001)
Removing registryHooks for default registry view RegistryHookManager 1/27/2025 8:19:46 AM 1 (0x0001)
Removing registryHooks for Wow6432 registry view RegistryHookManager 1/27/2025 8:19:46 AM 1 (0x0001)
End of Script Runner. Exit code is: 0 ScriptRunner 1/27/2025 8:19:46 AM 1 (0x0001)
========================================================================================= ScriptRunner 1/27/2025 8:42:49 AM 1 (0x0001)
Starting ScriptRunner (V2.1.29.0) with 1 argument(s) ScriptRunner 1/27/2025 8:42:49 AM 1 (0x0001)
Current culture info name is: en-US ScriptRunner 1/27/2025 8:42:49 AM 1 (0x0001)
Running as NT AUTHORITY\SYSTEM (Admin) ScriptRunner 1/27/2025 8:42:49 AM 1 (0x0001)
Working directory: C:\WINDOWS\IMECache\870a3d83-f264-4064-87c1-967bc798716a_1 ScriptRunner 1/27/2025 8:42:49 AM 1 (0x0001)
System path is C:\WINDOWS\System32 ScriptRunner 1/27/2025 8:42:49 AM 1 (0x0001)
Argument #1 is: /UpdatePackage Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Inspects argument: updatepackage Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Update mode requested Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Update installation mode requested. ScriptRunner 1/27/2025 8:42:49 AM 1 (0x0001)
Ready to install: [Microsoft Corporation] - [PowerShell Core (x64)] - [7.5.0] ScriptRunner 1/27/2025 8:42:49 AM 1 (0x0001)
Command-Line argument for Script-Runner is: /MainFile=PowerShell-7.5.0-win-x64.msi../MainArg=REBOOT=ReallySuppress.."/LoggingSwitch=/l {path}"../LoggingPath=%ProgramData%\Microsoft\IntuneManagementExtension\Logs\Software../LogRetentionDays=28 ScriptRunner 1/27/2025 8:42:49 AM 1 (0x0001)
Argument #1 is: /MainFile=PowerShell-7.5.0-win-x64.msi Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Inspects argument: mainfile=powershell-7.5.0-win-x64.msi Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
MainFile is: PowerShell-7.5.0-win-x64.msi Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Argument #2 is: /MainArg=REBOOT=ReallySuppress Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Inspects argument: mainarg=reboot=reallysuppress Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
MainArg is: REBOOT=ReallySuppress Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Argument #3 is: "/LoggingSwitch=/l {path}" Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Inspects argument: loggingswitch=/l {path} Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Logging switch is: /l {path} Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Argument #4 is: /LoggingPath=%ProgramData%\Microsoft\IntuneManagementExtension\Logs\Software Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Inspects argument: loggingpath=%programdata%\microsoft\intunemanagementextension\logs\software Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Logging path is: C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\Software Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Argument #5 is: /LogRetentionDays=28 Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Inspects argument: logretentiondays=28 Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Days to retain logs is: 28 Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Full logging path is: C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\Software\PowerShell-7.5.0-win-x64.msi.log Arguments 1/27/2025 8:42:49 AM 1 (0x0001)
Checking if MsiExec is available to perform an installation/uninstallation task ScriptRunner 1/27/2025 8:42:49 AM 1 (0x0001)
MsiExec is available. ScriptRunner 1/27/2025 8:42:49 AM 1 (0x0001)
Looking if update installation process need to be aborted due to running process ScriptRunner 1/27/2025 8:42:49 AM 1 (0x0001)
No need to abort due to the running processes ScriptRunner 1/27/2025 8:42:49 AM 1 (0x0001)
Running update file: PowerShell-7.5.0-win-x64.msi with arguments: REBOOT=ReallySuppress /l C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\Software\PowerShell-7.5.0-win-x64.msi.log PerfTimerLogger 1/27/2025 8:42:49 AM 1 (0x0001)
Update file has run, exit code is: 0 ScriptRunner 1/27/2025 8:43:56 AM 1 (0x0001)
Running update file: PowerShell-7.5.0-win-x64.msi with arguments: REBOOT=ReallySuppress /l C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\Software\PowerShell-7.5.0-win-x64.msi.log finished with Elapsed Time: 01 minutes 06 seconds 489 milliseconds PerfTimerLogger 1/27/2025 8:43:56 AM 1 (0x0001)
Cleaning up Notification RegKey ScriptRunner 1/27/2025 8:43:58 AM 1 (0x0001)
Cleaning up Notification folder ScriptRunner 1/27/2025 8:43:58 AM 1 (0x0001)
End of installation. Exit code is: 0 ScriptRunner 1/27/2025 8:43:58 AM 1 (0x0001)
Removing registryHooks for default registry view RegistryHookManager 1/27/2025 8:43:58 AM 1 (0x0001)
Removing registryHooks for Wow6432 registry view RegistryHookManager 1/27/2025 8:43:58 AM 1 (0x0001)
End of Script Runner. Exit code is: 0 ScriptRunner 1/27/2025 8:43:58 AM 1 (0x0001)