title: how to send SMS to mobile from Powershell
body: <p>I want to send a SMS to mobile using powershell.
  As we know, we can easily send email using powershell.
  In similar way i want to send SMS using powershell.</p>
  
  <p>I tried the following code:-</p>
  
  <pre><code>$smtpServer = "zzzz"
  $smtpFrom = "xxxx"
  $smtpTo = "yyyy@sms.bsnl.in"
  $message = New-Object System.Net.Mail.MailMessage $smtpfrom, $smtpto
  $message.Body="hi"
  $smtp = New-Object Net.Mail.SmtpClient($smtpServer)
  $smtp.Send($message)
  </code></pre>
  
  <p><strong>NOTE</strong>
  I need to send SMSs to different carriers. So I need to know the SMS gateway for all the sim carriers.
  This command is getting executed successfully but i am not recieving any messages. 
  I am not sure whther the SMS gateway is correct or not.
  Can someone please help in this regard</p>