Send-SMS Cmdlet
Parameters Output Objects Configuration Settings
The Send-SMS cmdlet is used to send SMS messages to cellular phones.
Syntax
Send-SMS [parameters]
Remarks
This cmdlet implements a lightweight message transmission interface using the Short Message Peer-to-Peer Protocol (SMPP), most known for its use in cellular text messaging. This cmdlet will bind as a transmitter, and thus cannot itself receive incoming SMS messages. However, it can send single and multi-recipient messages.
To send a SMS message with this cmdlet, set Server and Port to the server you wish to use, and supply a Credential to authenticate to the server with. Set Message with the text of the message you wish to send, and Recipient with the phone number(s) of the cellular phone(s) you're sending the message to.
The cmdlets support pipeline input for some of their parameters. Prebuilding an object and piping it to the cmdlet is very useful, but should be used with caution to prevent security conflicts. Steps have been taken to decrease the risk of a possibly accidental pipe to the cmdlet, for instance, the Credential parameter cannot be piped to the cmdlet and must be specified manually.
send-sms -server smpp.clickatell.com -port 2345 -cred $mycred -systemtype 123456 -recipient 15555555555 -message
"Hello from NetCmdlets"
Connection Handling
This cmdlet supports persistent connections through the Connection parameter. To establish a new SMS connection, use the Connect-SMS cmdlet. To close the connection, use the Disconnect-SMS cmdlet.
Parameter List
The following is the full list of the parameters of the cmdlet with short descriptions. Click on the links for further details.
Connection | An already established connection. |
LogFile | The location of a file to which debug information is written. |
Config | Specifies one or more configuration settings. |
Credential | The PSCredential object to use for user/password authentication. |
FirewallHost | Name or IP address of firewall. |
FirewallPassword | A password if authentication is to be used when connecting through the firewall. |
FirewallPort | The port of the firewall to which to connect. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
Force | Forces the cmdlet to accept the default behavior instead of querying the user. |
LocalIP | The IP address of the local interface to use. |
LogFile | The location of a file to which debug information is written. |
Message | The full text of the message to send (without headers). |
Password | The password to use for authentication. |
Port | The TCP port in the remote host to which to connect. |
Recipient | The recipient of the instant message. |
SenderAddress | The address of the ESME. |
Server | The address of the Server. |
SSL | Determines how the cmdlet starts SSL negotiation. |
SSLAccept | The encoded public key of the certificate which is to be trusted explicitly. |
SystemType | This is a string representing the type of system during a connection. |
Timeout | The maximum time allowed for the operation. |
UseHex | Specifies if Message is hex encoded. |
User | The username to use for authentication. |
Output Objects
The following is the full list of the output objects returned by the cmdlet with short descriptions. Click on the links for further details.
SMSDelivery | Object which indicates whether the message was received. |
Configuration Settings
The following is a list of configuration settings for the cmdlet with short descriptions. Click on the links for further details.
AddressRange | Specifies the addr_range parameter when binding. |
BinaryDataCoding | Whether or not to binary encode the message when DataCoding is set. |
BindAsReceiver | Causes the component to bind as a receiver. |
BindAsTransmitter | Causes the component to bind as a transmitter. |
DataCoding | The data encoding mechanism to be used for the current message. |
DestinationNPI | The Number Planning Indicator for the destination ESME. |
DestinationTON | The Type of Number for the destination ESME. |
DoSplitLargeMessages | Splits long messages and returns the UDH and Message Parts. |
HexString | A hex-encoded binary string to be sent to the current recipient. |
IntermediateNotification | Causes the component to request intermediate notification. |
MaxCIMDSMSLength | Indicates the maximum SMS message length for the CIMD protocol. |
MaxSMSLength | Indicates the maximum SMS message length. |
MCReceipt | The Type of MC Delivery Receipt requested. |
MessageInReceiptedMessageId | The receipted_message_id field of an incoming deliver_sm PDU. |
MessageMode | The Type of Messaging Mode requested. |
MessageType | The Type of Message. |
ProtocolId | The protocol identifier. |
SMEAcknowledgement | The Type of SME originated acknowledgement requested. |
SplitLargeMessages | Determines whether large messages are split into multiple parts. |
SplitMessageMethod | Determines how large messages are split into multiple parts. |
SourceNPI | The Number Planning Indicator for the ESME. |
SourceTON | The Type of Number for the ESME. |
SynchronousSendCommand | Controls whether SendCommand behaves synchronously or asynchronously. |
SynchronousSendMessage | Controls whether SendMessage behaves synchronously or asynchronously. |
CustomTLV | Optional TLV parameters added after the mandatory parameters and before the payload. |
SubAddr | Defines a unique index for application instance. |
StatusReportRequest | Defines in what cases a status report is created by the server. |
UseGSM7BitEncoding | Whether or not to use GSM 7-bit encoding. |
UseGSM7bitEncodingCompression | Whether to compress GSM 7-bit encoded characters. |
WaitForBanner | Specifies the CIMD2 banner the cmdlet will wait for when connecting. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the cmdlet whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The port in the local host where the cmdlet binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
ProxyExceptionsList | A semicolon separated list of hosts and IPs to bypass when using a proxy. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
UseIPv6 | Whether to use IPv6. |
TcpNoDelay | Whether or not to delay when sending packets. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
UseBackgroundThread | Whether threads created by the cmdlet are background threads. |
UseInternalSecurityAPI | Tells the cmdlet whether or not to use the system security libraries or an internal implementation. |