Score:5

Extremely slow PowerShell operation on laptops

in flag

We have a fleet of ThinkPad X1s, running Windows 11, that are showing the same symptoms when using PowerShell (.NET Core 7.2.2 to be exact).

Very slow profile loading (Chocolatey's module tells that it takes more than 2000 ms to load, and it has been verified that Chocolatey isn't the issue) and overall responsiveness (like at least a second between command finishing and shell being ready again).

Except for (unrelated?) smart card errors (which don't make much sense as, except for a 4G-LTE modem, there are no card device on those machine), Event Viewer is empty.

Smart Card Reader 'Microsoft UICC ISO Reader 89946827 1' rejected IOCTL TRANSMIT: Access is denied.  If this error persists, your smart card or reader may not be functioning correctly.

Command Header: 00 a4 04 00

Launching it with -NoProfile didn't change anything, nor did reinstalling PowerShell Core. Researching the error didn't give an answer either.

Is there a way to make PowerShell return to normal speed?

Score:9
in flag

Looking "UICC ISO Reader" up (and not the whole error) on Google led me to the error being related to the 4G-LTE modem.

After trying disabling, in Device Manager, the LTE device, PowerShell started behaving correctly and the shell responsiveness was restored.

I don't know why PowerShell Core tried to connect with the 4G-LTE modem when it is disabled in Windows Settings.

Looking at the SIM slot, it came about that there is a carrier-disabled SIM card in all those laptops, and I think that the "Access is denied" error comes from the fact that the SIM cards aren't activated.

As we don't use PowerShell v5, we haven't tried that. Neither was removing the SIM card tried.

ph flag
Can you disable it in the system BIOS?
mx flag
I would second disabling it in firmware settings if possible. Most good Thinkpads will let you do this, and it will likely not only improve PowerShell performance, but may also make the system boot faster and possibly use less power.
Nicolas Formichella avatar
in flag
Sure, it is possible, but we are supposed to deploy those laptops with their modems up and running. I guess we could ship discrete modems if that problem resurfaces with valid SIM cards but it would be a waste to have specced the laptops with an integrated modem
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.