Opens in a new tab
New
SMS MCP server: Let your AI agents send SMS and voice messages
Learn more

Guide: Sending SMS with PowerShell

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

Send SMS with windows powershell
Problem

Windows PowerShell is a framework from Microsoft that includes a command-line shell and a scripting language, but does not include an SMS function.

Solution

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

Result

You can receive SMS notifications about the status or results of your scripts using PowerShell, send alarms or warnings for critical events, and much more.

Here's how to send SMS using PowerShell


  • First of all, you need to set the ExecutionPolicy to Bypass, if you haven't already done so. This will allow our SMS script to be imported into your system.
  • Start Powershell as an administrator. To do this, search for „powershell“ in the Windows taskbar, right-click on the result, and select „Run as administrator“.

Run Powershell as an administrator

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

Set executionPolicy to Bypass

  • Select j for a Yes

Confirm executionPolicy

Extract the script zip file using right-click

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

Copy the path to the PowerShell SMS script as text

  • Using a CD and the directory path, you can now navigate in PowerShell to the folder of our SMS script.

Open PowerShell SMS Script

Create API Key for Powershell SMS Script

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

Configure the API Key

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

Set the API key

Programmer receives his first 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 messages to your customers, partners, or employees worldwide. The LOX24 SMS API offers you the following benefits:

  • You benefit from high availability, quality and speed of SMS messaging.
  • You pay a reasonable price Pricing without fixed costs or hidden fees.
  • How do they meet the requirements of German data protection law, since all the 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 an easy, 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 view the following resources: SMS API

Keep Reading

All articles
SMS API
Sep 2024

How does SMS message filtering work?

The filtering functions of LOX24 allow you to cover your costs and protect yourself from attacks and malfunctions…

SMS API
Jun 2024

How to Use Symfony SMS & Voice Notifications

Follow these steps to send SMS and voice notifications in Symfony. The integration of SMS notifications…

SMS interface, SMS API, SMS gateway
Jan 2024

Mail2SMS: SMS Gateway Made Easy via Email

With Per Mail2SMS you can send SMS directly via email, without the need for technical knowledge. A…

2FA, SMS interface, SMS API
Jan 2024

RSA Authentication Manager SMS Sending

LOX24 SMS can be seamlessly integrated into RSA SecurID, a leading platform for identity and access management…

SMS API, sms-gateway-en
Jan 2024

Instructions: Send PowerShell SMS

You can send SMS using PowerShell. Simply use the SMS API interface from LOX24. In…

SMS interface, SMS API
Dec 2023

SMS Secrets: How to Increase Your Revenue

Text messages are an effective way to reach your customers and increase sales.

SMS API
Dec 2023

How can I increase my revenue with SMS?

Increase your revenue with SMS marketing campaigns, customer retention, and abandoned cart recovery.

2FA, MFA, SMS interface, SMS API
Oct 2023

Auth0 SMS and Voice 2FA

Our SMS integration allows you to use LOX24 as a MFA provider for Auth0, so you can use one-time passwords…

2FA, MFA, SMS interface, SMS API
Oct 2023

Auth0 SMS and Voice 2FA

Our SMS integration allows you to use LOX24 as a MFA provider for Auth0, so you can use one-time passwords…

Test for free!

Sign up today and get 50 cents free, with no obligations, for your trial — filters included.