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.

Advertisment to support michlstechblog.info

Wireshark/tcpdump: Write trace to a ringbuffer file

Hi,

sometimes it is necessary to only dump the network traffic before an event happend. For this cases wirkshark has the command line option for a ringbuffer.

Continue reading Wireshark/tcpdump: Write trace to a ringbuffer file

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

Linux: Disk recovery with ddrescue

Hi

‘ddrescue –direct’ will open the input with the O_DIRECT option for uncached reads. ‘raw devices’ are not needed on newer kernels. For older kernels see below.
Continue reading Linux: Disk recovery with ddrescue

My Knowledgebase for things about Linux, Windows, VMware, Electronic and so on…