Monthly Archives: October 2014

SharePoint 2013 redirect HTTP to HTTPS using URL Rewrite

Previous posts I found regarding this state to use {R:1} in the redirect action but this wouldn’t work for me, replacing this with {REQUEST_URI} did. To use create a new IIS site running on port 80 (it should be the

Tagged with: , ,
Posted in SharePoint

Sending email from PowerShell

Add-PSSnapin Microsoft.Exchange.Management.Powershell.Admin -erroraction silentlyContinue $smtpServer = “dc.dev.local” $msg = new-object Net.Mail.MailMessage $msg.IsBodyHtml = $true¬† # optional, will send email as HTML $smtp = new-object Net.Mail.SmtpClient($smtpServer, 25) $msg.From = “emailadmin@test.com” $msg.To.Add(“newstarter@DC.dev.local”) $msg.Subject = “My Email Title” $msg.Body = “The body of

Tagged with:
Posted in PowerShell, Uncategorized

Run PowerShell script from Windows Task Scheduler

Set the action of the task to powershell.exe In the arguments box add the following -file “C:\path\to\my\script\powershell.ps1” That’s it, on the schedule you specify the script will run

Tagged with:
Posted in PowerShell