Score:0

Why is Windows 10 22H2 update erasing WinRM settings?

ng flag

I used the Media Creation Tool for Windows 10 downloaded from here to create a Windows 10 22H2 image. Then I proceeded to install the image by running setup.exe with the following command line switches:

setup.exe /Quiet /NoReboot /Auto Upgrade

After that I realized that the upgrade has removed Windows Remote Management Settings (and who knows what else) from my PC. For e.g. WinRM was configured to run on HTTPS, start automatically and use certificate authentication. Everything was gone.

According to the documentation here, the command line switches used should not erase apps or data but it removed settings of WinRM.

I reverted back to the previous build and everything came back. But I really need to upgrade the systems. Any help, tips are greatly appreciated.

Thanks

cn flag
`I reverted back to the previous build`. Logs. Information in Windows regarding setup activities are located in log files. These logs may be examined to determine the operations executed, the order, and any issues or exceptions that may have occurred. https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-log-files-and-event-logs?view=windows-11 https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-command-line-options?view=windows-11
Score:1
ng flag

I'm not aware of any known issue or bug in the Windows 10 22H2 update that specifically erases the WinRM (Windows Remote Management) settings. However, it's possible that the update process may have reset some settings or configurations that were previously customized by the user or system administrator.

To ensure that your WinRM settings are preserved during an update, it is recommended to take a backup of your settings beforehand. You can do this by exporting the WinRM configuration using the command below in powershell

Backup-Item WSMan:\localhost\Service\ -Path "C:\path\to\backup\file" -Recurse

Replace "C:\path\to\backup\file" with the path where you want to save the backup file. This command will backup the entire WinRM service configuration.

You can then use this backup to restore the WinRM configuration on the same machine or on another machine by copying the backup file to the target machine and running the following command:

Restore-Item "C:\path\to\backup\file" -Destination WSMan:\localhost\Service\ -Recurse
Abhisek Dash avatar
ng flag
Thank you for answering. winrm export <filename> says no option "export". Is the syntax different
David Kariuki avatar
ng flag
Oh, sorry about that, I have updated the answer, please check if that works on the PowerShell version you are using
Abhisek Dash avatar
ng flag
I am using powershell version 5. It has neither Backup-Item nor Restore-Item. Based on a quick google search, I don't think any powershell version has these commands.
Abhisek Dash avatar
ng flag
I am able to get wsman configuration using Get-ChildItem wsman:\localhost -Recurse. This gives me the entire configuration along with wsman resource URLs Is it possible to load this configuration on the updated PC in 1 shot? I am looking for powershell commands that can load dumped configuration automatically.
I sit in a Tesla and translated this thread with Ai:

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.