$TimeStamp = Get-Date -UFormat "%Y%m%d-%H%M%S"
$TranscriptPath = "D:\PowerShellTasks\StartDatastoreUnmap\Logs\StartDatastoreUnmapTask-$Timestamp.log"
Start-Transcript $TranscriptPath

try
{
    Start-ITDVMwareDatastoreUnmap -Credential $svcitdvmvcauto -Verbose
}
catch
{
    Send-MailMessage -To itdvctremailalerts@nd.gov -From itdvmvcp1script@nd.gov -Subject "Task StartITDVMwareDatastoreUnmap errored" -Body "Task started $TimeStamp.`nCheck logs for further information" -SmtpServer apprelay1.nd.gov
}