Invoking commands in Linux systems via SSH with the help of Powershell

In one of my projects, I was needed to write a script that will send SMS messages. We already had Linux server with GSM-modem that accepted commands sent by SSH. So, I was only needed to connect from Windows system to Linux with SSH protocol.

I tried to use the SSH-Session module for Powershell, but it have some issues when sending commands. So I started to work with Posh-SSH module.