| Believe it or not... This is a Racing Game. |
What is the fine line between fun challenge and pure frustration? Well I don't know, but I'm trying my damnedest to find out!
| Believe it or not... This is a Racing Game. |
Send-MailMessage -to someuser@someserver.com -From someotheruser@someserver.com -SmtpServer somemailserver -Subject "Test" -BodyAsHtml "TEST <br /><img src="attachement.png" />" -Attachments "C:\Scripts\attachement.png"
|
Add-PSSnapin Microsoft.Exchange.Management.Powershell.Admin -erroraction silentlyContinue
$smtpServer = "somemailserver" $att = new-object Net.Mail.Attachment("c:\scripts\attachment.png") $att.ContentId = "att" $msg = new-object Net.Mail.MailMessage $smtp = new-object Net.Mail.SmtpClient($smtpServer) $body = "Some Text<br /> <img src="cid:att" />" $msg.From = "someuser@manly.nsw.gov.au" $msg.To.Add("someotheruser@manly.nsw.gov.au") $msg.Subject = "Some Subject" + (get-date -format yyyyMMdd) $msg.Body = $body $msg.IsBodyHTML = $true $msg.Attachments.Add($att) $smtp.Send($msg) $att.Dispose() |
$servers = Get-ADComputer -filter {OperatingSystem -like "*Server*"}
$report = @() foreach ($server in $servers) { $temp = "" | select Name, There $temp.name = $server.DNSHostName
$temp.there = if(Test-Connection $server.DNSHostName -Count 1){$true}
$report += $temp } $report |
Add-PSSnapin *exchange*
$user = "TESTUSER" $mailboxes = get-mailbox foreach ($mailbox in $mailboxes) { $mailboxpermission = Get-Mailboxpermission $mailbox foreach ($permission in $mailboxpermission) { $permission | where {$_.Accessrights -Contains "FullAccess" -and $_.user -like "*$user*"} | select Identity } } |
Add-PSSnapin *exchange*
Get-Mailbox | Get-aduser -identity {$_.samaccountname} -Properties enabled | where {$_.enabled -eq $False} | Select Name |