Category Archives: Powershell

Powershell 7: Use Powershell 7 as WinRM shell

Hi,

to enter a Powershell 7 shell over WinRM setup the machines as followed:
Continue reading Powershell 7: Use Powershell 7 as WinRM shell

Windows: Check if Powershell process is the 32 or 64 Bit Version

Hi,

sometimes it is importend, when writing to the registry or file system in regions where the architecture redirection active, to known on which version a script runs.

Continue reading Windows: Check if Powershell process is the 32 or 64 Bit Version

Powershell: Create a powershell module

Hi,

this describes the creation of an powershell module.

Continue reading Powershell: Create a powershell module

Windows: Reset, enable and configure Powershell remoting

Hi,

here are the steps to reset WinRM service and start from scratch.
Continue reading Windows: Reset, enable and configure Powershell remoting

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.