How to: Send PowerShell SMS

You can send SMS with the PowerShell. Simply use the SMS API interface from LOX24. In this article, we show you how to do it.

Windows PowerShell is a framework from Microsoft that includes a command line shell and a scripting language, but no SMS function.


LOX24 offers you a ready-to-use script “out of the box” to send SMS worldwide directly from the PowerShell.


You can use PowerShell to receive SMS notifications about the status or result of your scripts, send alarms or warnings about critical events and much more.

How to send SMS with PowerShell

  • First, you must set the ExecutionPolicy to Bypass if you have not already done so. This will enable you to import our SMS script.
  • Start the Powershell as administrator. To do this, search for “powershell” in the Windows task bar, right-click the result and select “Run as administrator”.

Run the Powershell as administrator

  • Now enter “Set-ExecutionPolicy -ExecutionPolicy Bypass” in the command line

Set ExecutionPolicy to Bypass

  • Select y for yes

Confirm ExecutionPolicy

Extract script zip via right click

  • Copy the directory path of the unzipped folder as text.

Copy directory path to the PowerShell SMS script as text

  • Use a CD and the directory path to navigate to the folder of our SMS script in PowerShell

Open PowerShell SMS Script

Create API key for Powershell SMS script

  • Now copy this API key into the PowerShell and set it with the following command: Set-Lox24ApiKey -ApiKey “YourApiKeyHere”

Configure API key

  • And then you can send your first SMS. The SMS always has the destination number, the sender ID of your SMS (max. 11 characters of text or 15 digits of phone number) and the SMS text as parameters: Send-SMS -To 491700000000 -From “YourCompany” -Message “Test SMS from PowerShell!”

Set API key

Programmierer empfängt seine erste PowerShell SMS

Advantages of sending PowerShell SMS with LOX24

The LOX24 SMS API is a powerful and reliable solution for sending SMS messages. With the LOX24 SMS API you can connect your PowerShell to the LOX24 SMS Gateway and send SMS to your customers, partners or employees worldwide. The LOX24 SMS API offers you the following advantages:

  • You benefit from high availability, quality and speed of SMS transmission.
  • You pay low prices without fixed costs or hidden fees.
  • We fulfill the requirements of German data protection law, as all servers are located in Germany,
  • You receive real-time statistics and delivery reports for your SMS messages.

The LOX24 SMS API is therefore an ideal choice for anyone looking for a simple, secure and cost-effective way to integrate SMS messages into their applications. If you would like to learn more about the LOX24 SMS API, you can take a look at the following resources: SMS API

Esto también podría interesarle

Mails in SMS umwandeln und so via SMS Gateway versenden

With Mail2SMS you can send SMS directly by e-mail without the need for any technical knowledge. A mail SMS gateway is a service that converts e-mails into SMS and forwards them to the desired recipients.

Empezar ahora

Regístrese gratis y reciba 50 céntimos para probar sin compromiso.