diff --git a/usercount.ps b/usercount.ps index 4dcbfc7..d8d21f6 100644 --- a/usercount.ps +++ b/usercount.ps @@ -22,5 +22,5 @@ Function ADCOUNT } ADCOUNT | out-file c:\Windows\Temp\adcount.txt $datum = (get-date -uformat "%B %Y") -send-MailMessage -To $mailto -Subject "AD Count output" -Body "Rapport created on $datum" -SmtpServer $mailserv -From $mailfrom -Attachment "c:\windows\temp\adcount.txt" +send-MailMessage -To "$mailto" -Subject "AD Count output" -Body "Rapport created on "$datum" -SmtpServer "$mailserv" -From "$mailfrom" -Attachment "c:\windows\temp\adcount.txt" remove-item c:\windows\temp\adcount.txt \ No newline at end of file