Category Archives: Windows knowhow

Howto do some things in Windows

Windows: Invoke-RestMethod =>The underlying connection was closed: An unexpected error occurred on a receive.

Hi,

Invoke-RestMethod or Invoke-WebRequest uses by default TLS 1.0. This protocal is outdated and would be not accepted by the most Webservers anymore.

Usually this results in the following error message:
The underlying connection was closed: An unexpected error occurred on a receive.

Continue reading Windows: Invoke-RestMethod =>The underlying connection was closed: An unexpected error occurred on a receive.

Windows Terminal Server: Microsoft Edge does not open when the same user has edge already opened

Hi,

Edge and Chrom can only be opened one time for a user. If a user has multiple sessions opened on a Windows Terminal Server with the same credenitals, edge can only start once time because the profile (UserDataDir) can only used by one instance. Otherwise the profile is getting corrupt.

A workaround is to assign each session a seperate UserDataDir. This has one disadvantage: Bookmarks and so on depends on the sessionname.

To start edge in multiple RDP session I used the following command line parameter. This sets the DataDir to the sessionname.

edge --user-data-dir=C:\Users\%UserName%\AppData\Local\Microsoft\Edge\Profile\%SESSIONNAME%

Another option is the %CLIENTNAME% variable. CLIENTNAME contains the Computername of the machine from which you establish the RDP session.

Michael

Windows: GPO Logon/logoff scripts

Hi,

User GPO logon/logoff script definitions are stored in an extra place. They are not part of C:\windows\System32\grouppolicy\user\registry.pol nor they can be exported my secedit.
Continue reading Windows: GPO Logon/logoff scripts

Powershell: Some basics accessing the BCDstore by WIM

Hi,

here are some starters for accessing the bcd store from powershell by using WMI.

Continue reading Powershell: Some basics accessing the BCDstore by WIM

winget: Basic usage

Hi,

here are some winget basics
Continue reading winget: Basic usage