Skip to main content

Posts

Showing posts from January, 2022

The following Error happen when opening the remote Runspace: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

 This error appears if you have disabled TLS 1.0 & 1.1 on the server & client protocol on the machine. Full error description is listed below under the image. Make sure your application is enforce to send communication via Tls1.2 protocol only. Error description: The following Error happen when opening the remote Runspace: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host    at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)    at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)    --- End of inner exception stack trace --- ...

How to connect to MS 365 using Windows PowerShell

 Below are the steps that can be used to connect Microsoft Office 365 easily. Run Windows PowerShell (run as administrator) Execute below commands: 1:  $Cred = Get-Credential This will open a pop-up window insert your Office365 account credentials 2:  $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Cred -Authentication Basic -AllowRedirection 3:  Import-PSSession $Session Now you shall able to execute any command depends on the provided account credentials privileges.

How to check which .NET Framework version are installed

  You can easily determine which .net version is installed on any Windows Operating system by executing below command in command prompt (cmd)   reg query "HKLM\SOFTWARE\Microsoft\Net Framework Setup\NDP\v4" /s Sample Output

How to generate a self-signed SSL certificate for an IP address

This guide targeting how to connect remote Active Directory using secure LDAP-s Protocol. It is very common and easy that you can setup generate self sign certificate against any common name but challenge appears if you want to have certificate for internal IP address as common name. Please check and follow step by step instructions of below video to achieve this objective. Feel free to message me if you need any assistance. Thank you