Skip to main content

Posts

Showing posts from April, 2012

How to Change the email address that PowerShell uses to send mail through Outlook

I’m using the code below to send mail from PowerShell through Outlook. $olMailItem = 0 $olApp = new-object -comobject outlook.application $NewMail = $olApp .CreateItem( $olMailItem ) $NewMail .Subject = " PowerShell Test e-mail " $NewMail .To = " Jason@MCTExpert.com " $NewMail .Body = " Have a nice day " $NewMail .SentOnBehalfOfName = " PleaseWork@MCTExpert.com " $NewMail .Send()   The problem was that the reply address was mine.  I needed to change this so I did a little bit of research.  I changed the final line of the script to   $olMailItem = 0 $olApp = new-object -comobject outlook.application $NewMail = $olApp .CreateItem( $olMailItem ) $NewMail .Subject = " PowerShell Test e-mail " $NewMail .To = " Jason@MCTExpert.com " $NewMail .Body = " Have a nice day " $NewMail | Get-Member This get me the following results. Take a look at the highligh

The importance of PowerShell is growing

Recently I read an article from Redmond Magazine about the importance for IT professionals to learn Windows PowerShell. ( You can read the article here )  In the article, there is a good quote that I would like to post here. Right now, you've got a choice if you want to remain relevant as an IT professional: Learn Windows PowerShell, or learn ‘Do you want fries with that?'" Greg Shields  (RedmondMag.com) This morning I am building a new Windows 8 test environment using the Windows 8 Datacenter Beta.  I usually just go right through the installation but this morning I stopped and read some changes.  I’m looking at the screen where you choose between Server Core and the Full installation (now called Server with a GUI ). Read the differences in the description between Server 2008 and Server 8 for the both the Server Core and Full installation.  take note of when command prompter and PowerShell is used as well as which is the “Recommended” installation. Server Core 2008