<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Send text messages (SMS) using Windows PowerShell</title>
	<atom:link href="http://blog.powershell.no/2010/07/21/send-text-messages-sms-using-windows-powershell/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.powershell.no/2010/07/21/send-text-messages-sms-using-windows-powershell/</link>
	<description>On Windows PowerShell and other admin-related topics</description>
	<lastBuildDate>Fri, 09 Dec 2011 10:08:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: dennis</title>
		<link>http://blog.powershell.no/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-326</link>
		<dc:creator><![CDATA[dennis]]></dc:creator>
		<pubDate>Tue, 24 Aug 2010 09:16:49 +0000</pubDate>
		<guid isPermaLink="false">https://janegilring.wordpress.com/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-326</guid>
		<description><![CDATA[&quot;Does it work when running locally&quot;
A: Yes, it works very well, even if without invoking of logon.

Thanks for your help! I&#039;ll submit question to that forum.]]></description>
		<content:encoded><![CDATA[<p>&#8220;Does it work when running locally&#8221;<br />
A: Yes, it works very well, even if without invoking of logon.</p>
<p>Thanks for your help! I&#8217;ll submit question to that forum.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Egil Ring</title>
		<link>http://blog.powershell.no/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-325</link>
		<dc:creator><![CDATA[Jan Egil Ring]]></dc:creator>
		<pubDate>Tue, 24 Aug 2010 08:20:48 +0000</pubDate>
		<guid isPermaLink="false">https://janegilring.wordpress.com/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-325</guid>
		<description><![CDATA[Does it work when running locally (not using Invoke-Command -computername)?
Since outlook.exe are started in the background when loading the Outlook COM-object, it might be that some functionality doesn`t work in a remote session.
I would suggest you submit a question regarding this over at the Scripting Guys forum at Microsoft TechNet:
http://social.technet.microsoft.com/Forums/en/ITCG/threads

I`m sure someone there would be able to provide assistance regarding the issue.]]></description>
		<content:encoded><![CDATA[<p>Does it work when running locally (not using Invoke-Command -computername)?<br />
Since outlook.exe are started in the background when loading the Outlook COM-object, it might be that some functionality doesn`t work in a remote session.<br />
I would suggest you submit a question regarding this over at the Scripting Guys forum at Microsoft TechNet:<br />
<a href="http://social.technet.microsoft.com/Forums/en/ITCG/threads" rel="nofollow">http://social.technet.microsoft.com/Forums/en/ITCG/threads</a></p>
<p>I`m sure someone there would be able to provide assistance regarding the issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dennis</title>
		<link>http://blog.powershell.no/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-324</link>
		<dc:creator><![CDATA[dennis]]></dc:creator>
		<pubDate>Tue, 24 Aug 2010 04:34:25 +0000</pubDate>
		<guid isPermaLink="false">https://janegilring.wordpress.com/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-324</guid>
		<description><![CDATA[After invoking of Logon, there will be an exception when calling &quot;CreateItem&quot;:
Exception calling &quot;CreateItem&quot; with &quot;1&quot; argument(s): &quot;Cannot create the e-mail m
essage because a data file to send and receive messages cannot be found. Check y
our settings in this Microsoft Outlook profile. In Microsoft Windows, click the 
Start button, and then click Control Panel. Click User Accounts, and then click 
Mail.  Click Show Profiles, select this profile, and then click Propertiess.&quot;
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

So, I invoked AddStore method to add an store with a dat file like this:
$otherStoreDataFile = &quot;d:\test\test.pst&quot;
$nameSpace.AddStore($otherStoreDataFile);
but there will be another error:
Exception calling &quot;AddStore&quot; with &quot;1&quot; argument(s): &quot;The Outlook data file (.pst)
 failed to load for this session.&quot;
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

Could you help to figure out the reason? How can I get an actual Session of Outlook? What&#039;s the right manner to Send MMS using Powershell remotely?]]></description>
		<content:encoded><![CDATA[<p>After invoking of Logon, there will be an exception when calling &#8220;CreateItem&#8221;:<br />
Exception calling &#8220;CreateItem&#8221; with &#8220;1&#8243; argument(s): &#8220;Cannot create the e-mail m<br />
essage because a data file to send and receive messages cannot be found. Check y<br />
our settings in this Microsoft Outlook profile. In Microsoft Windows, click the<br />
Start button, and then click Control Panel. Click User Accounts, and then click<br />
Mail.  Click Show Profiles, select this profile, and then click Propertiess.&#8221;<br />
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException<br />
    + FullyQualifiedErrorId : DotNetMethodException</p>
<p>So, I invoked AddStore method to add an store with a dat file like this:<br />
$otherStoreDataFile = &#8220;d:\test\test.pst&#8221;<br />
$nameSpace.AddStore($otherStoreDataFile);<br />
but there will be another error:<br />
Exception calling &#8220;AddStore&#8221; with &#8220;1&#8243; argument(s): &#8220;The Outlook data file (.pst)<br />
 failed to load for this session.&#8221;<br />
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException<br />
    + FullyQualifiedErrorId : DotNetMethodException</p>
<p>Could you help to figure out the reason? How can I get an actual Session of Outlook? What&#8217;s the right manner to Send MMS using Powershell remotely?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Egil Ring</title>
		<link>http://blog.powershell.no/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-323</link>
		<dc:creator><![CDATA[Jan Egil Ring]]></dc:creator>
		<pubDate>Mon, 23 Aug 2010 11:02:47 +0000</pubDate>
		<guid isPermaLink="false">https://janegilring.wordpress.com/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-323</guid>
		<description><![CDATA[Could you provide the exact error message?]]></description>
		<content:encoded><![CDATA[<p>Could you provide the exact error message?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dennis</title>
		<link>http://blog.powershell.no/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-322</link>
		<dc:creator><![CDATA[dennis]]></dc:creator>
		<pubDate>Mon, 23 Aug 2010 07:55:10 +0000</pubDate>
		<guid isPermaLink="false">https://janegilring.wordpress.com/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-322</guid>
		<description><![CDATA[Here are the encoded xml:

&quot;&lt;?xml version=&quot;1.0&quot; standalone=&quot;yes&quot;?&gt;\r\n&lt;smil&gt;\r\n  &lt;head&gt;\r\n    &lt;meta name=&quot;author&quot; content=&quot;MSOfficeOlkOMS&quot;/&gt;\r\n    &lt;layout&gt;\r\n      &lt;root-layout width=&quot;176&quot; height=&quot;220&quot; background-color=&quot;#ffffff&quot;/&gt;\r\n      &lt;region id=&quot;Image&quot; left=&quot;0%&quot; top=&quot;0%&quot; width=&quot;100%&quot; height=&quot;75%&quot; fit=&quot;slice&quot;/&gt;\r\n      &lt;region id=&quot;Text&quot; left=&quot;0%&quot; top=&quot;75%&quot; width=&quot;100%&quot; height=&quot;25%&quot; fit=&quot;slice&quot;/&gt;\r\n    &lt;/layout&gt;\r\n  &lt;/head&gt;\r\n  &lt;body&gt;\r\n    &lt;par dur=&quot;3s&quot;&gt;\r\n      &lt;img src=&quot;cid:Att1.jpg@AB1B43B2B0594564.B94EF7ABB12B49BA&quot; region=&quot;Image&quot;/&gt;\r\n      &lt;text src=&quot;cid:Att0.txt@AB1B43B2B0594564.B94EF7ABB12B49BA&quot; region=&quot;Text&quot;&gt;\r\n        &lt;param name=&quot;foreground-color&quot; value=&quot;#000000&quot; /&gt;\r\n      &lt;/text&gt;\r\n    &lt;/par&gt;\r\n  &lt;/body&gt;\r\n&lt;/smil&gt;&quot;]]></description>
		<content:encoded><![CDATA[<p>Here are the encoded xml:</p>
<p>&#8220;&lt;?xml version=&quot;1.0&quot; standalone=&quot;yes&quot;?&gt;\r\n&lt;smil&gt;\r\n  &lt;head&gt;\r\n    &lt;meta name=&quot;author&quot; content=&quot;MSOfficeOlkOMS&quot;/&gt;\r\n    &lt;layout&gt;\r\n      &lt;root-layout width=&quot;176&quot; height=&quot;220&quot; background-color=&quot;#ffffff&quot;/&gt;\r\n      &lt;region id=&quot;Image&quot; left=&quot;0%&quot; top=&quot;0%&quot; width=&quot;100%&quot; height=&quot;75%&quot; fit=&quot;slice&quot;/&gt;\r\n      &lt;region id=&quot;Text&quot; left=&quot;0%&quot; top=&quot;75%&quot; width=&quot;100%&quot; height=&quot;25%&quot; fit=&quot;slice&quot;/&gt;\r\n    &lt;/layout&gt;\r\n  &lt;/head&gt;\r\n  &lt;body&gt;\r\n    &lt;par dur=&quot;3s&quot;&gt;\r\n      &lt;img src=&quot;cid:Att1.jpg@AB1B43B2B0594564.B94EF7ABB12B49BA&quot; region=&quot;Image&quot;/&gt;\r\n      &lt;text src=&quot;cid:Att0.txt@AB1B43B2B0594564.B94EF7ABB12B49BA&quot; region=&quot;Text&quot;&gt;\r\n        &lt;param name=&quot;foreground-color&quot; value=&quot;#000000&quot; /&gt;\r\n      &lt;/text&gt;\r\n    &lt;/par&gt;\r\n  &lt;/body&gt;\r\n&lt;/smil&gt;&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dennis</title>
		<link>http://blog.powershell.no/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-321</link>
		<dc:creator><![CDATA[dennis]]></dc:creator>
		<pubDate>Mon, 23 Aug 2010 07:44:38 +0000</pubDate>
		<guid isPermaLink="false">https://janegilring.wordpress.com/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-321</guid>
		<description><![CDATA[When I submit the comments, the contents of $smilXml are missed. But it&#039;s OK, the errors do not occurs there, and you can set $smil as follows:


  
    
    
      
      
      
    
  
  
    
      
      
        
      
    
  
]]></description>
		<content:encoded><![CDATA[<p>When I submit the comments, the contents of $smilXml are missed. But it&#8217;s OK, the errors do not occurs there, and you can set $smil as follows:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dennis</title>
		<link>http://blog.powershell.no/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-320</link>
		<dc:creator><![CDATA[dennis]]></dc:creator>
		<pubDate>Mon, 23 Aug 2010 07:39:43 +0000</pubDate>
		<guid isPermaLink="false">https://janegilring.wordpress.com/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-320</guid>
		<description><![CDATA[I met a problem. I modified your scripts to enable sending a MMS, it works well. But i want to run these scripts remotely on another computer by using invoke-command, like this(the remote computer&#039;s PowerShell execution policy had been set as &#039;Unrestricted&#039;):
invoke-command -computer $computerName -credential $credentialInfo -scriptblock {....}
There will be a few errors when scripts running in the braces(I believed the logon method must be invoke when runnting scripts in braces), could you please help me to check how to fix the errors?

The scripts are as follows:
$ret = invoke-command -computer $computerName -Credential $credential -scriptblock {
	param(
		[string]$messageContent,
		[string]$omsSmsRecipient
	)
    
    # Check whether Outlook is installed
	if (-not (Test-Path &quot;HKLM:\Software\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE&quot;)) {
		Write-Warning &quot;Outlook is not installed. The message was not sent.&quot;
		return $false
	}
    
    Write-Host &quot;Outlook is installed.&quot;
    
    # Create Outlook application
    $outlookApp = New-Object -ComObject outlook.application
    if ($outlookApp -eq $null)
    {
        Write-Host &quot;Create Com Object Outlook.application failed.&quot;
        return $false
    }
    
    Write-Host &quot;Create Com Object Outlook.application success.&quot;
    
    # Declare namespace and current user
    $nameSpace = $null
    $curUser = $null
    
    #$curProfileName = $outlookApp.Session.CurrentProfileName
    #$curProfileName
    
    # Logon on outlook account
    $curUser = $outlookApp.Session.CurrentUser
    Write-Host &quot;Get current user.&quot;
    if ($curUser -eq $null)
    {
        Write-Warning &quot;User not logon on.&quot;
        
        $nameSpace = $outlookApp.GetNamespace(&quot;MAPI&quot;)
        if ($nameSpace -eq $null)
        {
            Write-Warning &quot;Namespace is null.&quot;
            return $false
        }
        else
        {
            Write-Warning &quot;Namespace is not null.&quot;
            $nameSpace.Logon($null, $null, $false, $false)
        }
        
        return $false
        
        $curUser = $outlookApp.Session.CurrentUser
        if ($curUser -eq $null)
        {
            Write-Warning &quot;User logon on failed.&quot;
            return $false
        }
    }
    
    Write-Host &quot;Current user is valid.&quot;
    return $false
    
    # Check Outlook version
    if ($outlookApp.Version.StartsWith(&quot;14&quot;) -eq $false)
    {
        Write-Warning &quot;Outlook version error, only Outlook 2010 is supported.&quot;
		return $false
    }
    
    # Check wheter an other account (SMS or MMS) are set up in Outlook
	if (-not (($outlookApp.Session.Accounts &#124; Where-Object {$_.AccountType -eq &quot;5&quot;} &#124; Measure-Object).Count -gt 0)) {
		Write-Warning &quot;Outlook are installed, but no accounts are configured for SMS or MMS. The message was not sent.&quot;
		return $false
	}
    
    # Check if Outlook are running
	$OutlookState = Get-Process &#124; Where-Object {$_.Name -eq &quot;outlook&quot;}
    
    # Create MMS mail item
	$mmsItem = $outlookApp.CreateItem(&quot;olMobileItemMMS&quot;)
    if ($mmsItem -eq $null)
    {
        #Write-Error &quot;Create MMS Mail Item Failed.&quot;
        Write-Warning &quot;Create MMS Mail Item Failed.&quot;
        return $false
    }
    
    # Set recipient and subject
	$mmsItem.To = $omsSmsRecipient
    $mmsItem.Subject = &quot;Test MMS Sent From Outlook Client&quot;;
    
    
    
    # Build multimedia content: text content
    $textFileName = &quot;D:\11.txt&quot;;
    $txtAttachment = $mmsItem.Attachments.Add($textFileName, 1);
    # Set ContentID of text content
    $txtAttachment.PropertyAccessor.SetProperty(&quot;http://schemas.microsoft.com/mapi/proptag/0x3712001F&quot;, &quot;cid:Att0.txt@AB1B43B2B0594564.B94EF7ABB12B49BA&quot;)

    # Build multimedia content: jpg content
    $jpgFileName = &quot;D:\test.jpg&quot;
    $jpgAttachment = $mmsItem.Attachments.Add($jpgFileName, 1);
    # Set ContentID of jpg content
    $jpgAttachment.PropertyAccessor.SetProperty(&quot;http://schemas.microsoft.com/mapi/proptag/0x3712001F&quot;, &quot;cid:Att1.jpg@AB1B43B2B0594564.B94EF7ABB12B49BA&quot;);
    
    # Build SMIL
    $smilXml = &quot;&quot;
    $smilXml += &quot;&quot;
    $smilXml += &quot;&quot;
    $smilXml += &quot;&quot;
    $smilXml += &quot;&quot;
    $smilXml += &quot;&quot;
    $smilXml += &quot;&quot;
    $smilXml += &quot;&quot;
    $smilXml += &quot;&quot;
    $smilXml += &quot;&quot;
    $smilXml += &quot;&quot;
    $smilXml += &quot;&quot;
    $smilXml += &quot;&quot;
    $smilXml += &quot;&quot;
    $smilXml += &quot;&quot;
    $smilXml += &quot;&quot;
    $smilXml += &quot;&quot;
    
    write-host $smilXml
    
    # Set SMILBody
    $mmsItem.SMILBody = $smilXml
    
    # Send MMS
    $mmsItem.Send($true)
    
    # Close outlook.exe if it was not running before executing this function   
	if (-not $OutlookState) {
		$outlookApp.Quit()
	}
    
    # Log off
    if ($nameSpace -ne $null)
    {
        $nameSpace.Logoff()
    }
    
    return $true

} -argumentlist $messageContent, $omsSmsRecipient

return $ret

trap [exception] { $_ &gt;&gt; .\TriggerSendDeliverXmsMessageWithMMS.txt}]]></description>
		<content:encoded><![CDATA[<p>I met a problem. I modified your scripts to enable sending a MMS, it works well. But i want to run these scripts remotely on another computer by using invoke-command, like this(the remote computer&#8217;s PowerShell execution policy had been set as &#8216;Unrestricted&#8217;):<br />
invoke-command -computer $computerName -credential $credentialInfo -scriptblock {&#8230;.}<br />
There will be a few errors when scripts running in the braces(I believed the logon method must be invoke when runnting scripts in braces), could you please help me to check how to fix the errors?</p>
<p>The scripts are as follows:<br />
$ret = invoke-command -computer $computerName -Credential $credential -scriptblock {<br />
	param(<br />
		[string]$messageContent,<br />
		[string]$omsSmsRecipient<br />
	)</p>
<p>    # Check whether Outlook is installed<br />
	if (-not (Test-Path &#8220;HKLM:\Software\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE&#8221;)) {<br />
		Write-Warning &#8220;Outlook is not installed. The message was not sent.&#8221;<br />
		return $false<br />
	}</p>
<p>    Write-Host &#8220;Outlook is installed.&#8221;</p>
<p>    # Create Outlook application<br />
    $outlookApp = New-Object -ComObject outlook.application<br />
    if ($outlookApp -eq $null)<br />
    {<br />
        Write-Host &#8220;Create Com Object Outlook.application failed.&#8221;<br />
        return $false<br />
    }</p>
<p>    Write-Host &#8220;Create Com Object Outlook.application success.&#8221;</p>
<p>    # Declare namespace and current user<br />
    $nameSpace = $null<br />
    $curUser = $null</p>
<p>    #$curProfileName = $outlookApp.Session.CurrentProfileName<br />
    #$curProfileName</p>
<p>    # Logon on outlook account<br />
    $curUser = $outlookApp.Session.CurrentUser<br />
    Write-Host &#8220;Get current user.&#8221;<br />
    if ($curUser -eq $null)<br />
    {<br />
        Write-Warning &#8220;User not logon on.&#8221;</p>
<p>        $nameSpace = $outlookApp.GetNamespace(&#8220;MAPI&#8221;)<br />
        if ($nameSpace -eq $null)<br />
        {<br />
            Write-Warning &#8220;Namespace is null.&#8221;<br />
            return $false<br />
        }<br />
        else<br />
        {<br />
            Write-Warning &#8220;Namespace is not null.&#8221;<br />
            $nameSpace.Logon($null, $null, $false, $false)<br />
        }</p>
<p>        return $false</p>
<p>        $curUser = $outlookApp.Session.CurrentUser<br />
        if ($curUser -eq $null)<br />
        {<br />
            Write-Warning &#8220;User logon on failed.&#8221;<br />
            return $false<br />
        }<br />
    }</p>
<p>    Write-Host &#8220;Current user is valid.&#8221;<br />
    return $false</p>
<p>    # Check Outlook version<br />
    if ($outlookApp.Version.StartsWith(&#8220;14&#8243;) -eq $false)<br />
    {<br />
        Write-Warning &#8220;Outlook version error, only Outlook 2010 is supported.&#8221;<br />
		return $false<br />
    }</p>
<p>    # Check wheter an other account (SMS or MMS) are set up in Outlook<br />
	if (-not (($outlookApp.Session.Accounts | Where-Object {$_.AccountType -eq &#8220;5&#8243;} | Measure-Object).Count -gt 0)) {<br />
		Write-Warning &#8220;Outlook are installed, but no accounts are configured for SMS or MMS. The message was not sent.&#8221;<br />
		return $false<br />
	}</p>
<p>    # Check if Outlook are running<br />
	$OutlookState = Get-Process | Where-Object {$_.Name -eq &#8220;outlook&#8221;}</p>
<p>    # Create MMS mail item<br />
	$mmsItem = $outlookApp.CreateItem(&#8220;olMobileItemMMS&#8221;)<br />
    if ($mmsItem -eq $null)<br />
    {<br />
        #Write-Error &#8220;Create MMS Mail Item Failed.&#8221;<br />
        Write-Warning &#8220;Create MMS Mail Item Failed.&#8221;<br />
        return $false<br />
    }</p>
<p>    # Set recipient and subject<br />
	$mmsItem.To = $omsSmsRecipient<br />
    $mmsItem.Subject = &#8220;Test MMS Sent From Outlook Client&#8221;;</p>
<p>    # Build multimedia content: text content<br />
    $textFileName = &#8220;D:\11.txt&#8221;;<br />
    $txtAttachment = $mmsItem.Attachments.Add($textFileName, 1);<br />
    # Set ContentID of text content<br />
    $txtAttachment.PropertyAccessor.SetProperty(&#8220;http://schemas.microsoft.com/mapi/proptag/0x3712001F&#8221;, &#8220;cid:Att0.txt@AB1B43B2B0594564.B94EF7ABB12B49BA&#8221;)</p>
<p>    # Build multimedia content: jpg content<br />
    $jpgFileName = &#8220;D:\test.jpg&#8221;<br />
    $jpgAttachment = $mmsItem.Attachments.Add($jpgFileName, 1);<br />
    # Set ContentID of jpg content<br />
    $jpgAttachment.PropertyAccessor.SetProperty(&#8220;http://schemas.microsoft.com/mapi/proptag/0x3712001F&#8221;, &#8220;cid:Att1.jpg@AB1B43B2B0594564.B94EF7ABB12B49BA&#8221;);</p>
<p>    # Build SMIL<br />
    $smilXml = &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;<br />
    $smilXml += &#8220;&#8221;</p>
<p>    write-host $smilXml</p>
<p>    # Set SMILBody<br />
    $mmsItem.SMILBody = $smilXml</p>
<p>    # Send MMS<br />
    $mmsItem.Send($true)</p>
<p>    # Close outlook.exe if it was not running before executing this function<br />
	if (-not $OutlookState) {<br />
		$outlookApp.Quit()<br />
	}</p>
<p>    # Log off<br />
    if ($nameSpace -ne $null)<br />
    {<br />
        $nameSpace.Logoff()<br />
    }</p>
<p>    return $true</p>
<p>} -argumentlist $messageContent, $omsSmsRecipient</p>
<p>return $ret</p>
<p>trap [exception] { $_ &gt;&gt; .\TriggerSendDeliverXmsMessageWithMMS.txt}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Episode 120 &#8211; Alex Riedel on PrimalScript and Visual PowerShell &#171; PowerScripting Podcast</title>
		<link>http://blog.powershell.no/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-290</link>
		<dc:creator><![CDATA[Episode 120 &#8211; Alex Riedel on PrimalScript and Visual PowerShell &#171; PowerScripting Podcast]]></dc:creator>
		<pubDate>Mon, 02 Aug 2010 03:57:53 +0000</pubDate>
		<guid isPermaLink="false">https://janegilring.wordpress.com/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-290</guid>
		<description><![CDATA[[...] Use PowerShell to send SMS messages [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Use PowerShell to send SMS messages [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Egil Ring</title>
		<link>http://blog.powershell.no/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-284</link>
		<dc:creator><![CDATA[Jan Egil Ring]]></dc:creator>
		<pubDate>Tue, 27 Jul 2010 18:21:40 +0000</pubDate>
		<guid isPermaLink="false">https://janegilring.wordpress.com/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-284</guid>
		<description><![CDATA[Thanks for reading my blog and sharing your thoughts on this topic :)

I agree that every GUI feature in Windows might not be feasible in Windows PowerShell, but the idea that everything should be based on an automation engine is a good thing in my opinion. A thing that might be completely irrelavant to automate for one person might be relevant for others.

Regarding the specific topic on automating the SMS-feature in Outlook using PowerShell I agree that it doesn`t seem logic to transfer this to the commandline. However, this wasn`t my main purpose when writing this PowerShell function. Like I gave an example on, I see some practical use of this function in an Active Directory user provisioning script (sending the new user it`s new username and password on SMS). 
For IT-related situations, I guess there are several other scenarios where sending Active Directory users info on SMS.

Leveraging the Outlook COM API might not be the best solution for automating the sending of SMS messages, however, it might be a fast and easy solution for SMB environments :)]]></description>
		<content:encoded><![CDATA[<p>Thanks for reading my blog and sharing your thoughts on this topic <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I agree that every GUI feature in Windows might not be feasible in Windows PowerShell, but the idea that everything should be based on an automation engine is a good thing in my opinion. A thing that might be completely irrelavant to automate for one person might be relevant for others.</p>
<p>Regarding the specific topic on automating the SMS-feature in Outlook using PowerShell I agree that it doesn`t seem logic to transfer this to the commandline. However, this wasn`t my main purpose when writing this PowerShell function. Like I gave an example on, I see some practical use of this function in an Active Directory user provisioning script (sending the new user it`s new username and password on SMS).<br />
For IT-related situations, I guess there are several other scenarios where sending Active Directory users info on SMS.</p>
<p>Leveraging the Outlook COM API might not be the best solution for automating the sending of SMS messages, however, it might be a fast and easy solution for SMB environments <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justwondering</title>
		<link>http://blog.powershell.no/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-283</link>
		<dc:creator><![CDATA[Justwondering]]></dc:creator>
		<pubDate>Tue, 27 Jul 2010 16:13:33 +0000</pubDate>
		<guid isPermaLink="false">https://janegilring.wordpress.com/2010/07/21/send-text-messages-sms-using-windows-powershell/#comment-283</guid>
		<description><![CDATA[Just wondering, why would one want to use powershell to send a text message if they have outlook installed already ?

I mean, powershell is useful - no doubt, but isn&#039;t microsoft trying to mimick the NIX command line ? for after so many years promoting and building upon a GUI.

Suddenly everyone is talking just about powershell :-)

I read your blog almost twice in a week but I am still unaware of the benefits of &quot;Sending an SMS via Powershell&quot; which itself is relying on MS Outlook ?

Please enlighten, as I have seen posts on numerous blogs which are talking about using powershell for some tasks which are better done via the GUI.

Kind Regards]]></description>
		<content:encoded><![CDATA[<p>Just wondering, why would one want to use powershell to send a text message if they have outlook installed already ?</p>
<p>I mean, powershell is useful &#8211; no doubt, but isn&#8217;t microsoft trying to mimick the NIX command line ? for after so many years promoting and building upon a GUI.</p>
<p>Suddenly everyone is talking just about powershell <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I read your blog almost twice in a week but I am still unaware of the benefits of &#8220;Sending an SMS via Powershell&#8221; which itself is relying on MS Outlook ?</p>
<p>Please enlighten, as I have seen posts on numerous blogs which are talking about using powershell for some tasks which are better done via the GUI.</p>
<p>Kind Regards</p>
]]></content:encoded>
	</item>
</channel>
</rss>

