0
タイトルには、私たちの組織内で証明書の更新を自動化しようとしています。今、これはすべてExcelスプレッドシートで追跡されます。今私はスクリプトが期限切れであることを私たちのチームに伝えています。私がしたいことは、期限切れの証明書を使って各チームに送信することです。私が持っているスクリプトは、現在、以下の通りです:CSVファイルの解析スクリプトを作成し、証明書更新担当者に電子メールを送信しようとしています
Import-Csv -path D:\Scripts\Get-ExpiringCertificates\Certificates.csv |
Where-Object {$_.Status -like "Expires*"} |
Export-Csv D:\Scripts\Get-ExpiringCertificates\ExpiringCerts.csv
Send-MailMessage -From "[email protected]" -To [email protected] -Subject "Expiring Certs" -SmtpServer "mailint.edmc.edu" -Attachments D:\Scripts\Get-ExpiringCertificates\ExpiringCerts.csv -Body "Please see attachment for the list of Certificates Expiring within the next 90 days."
私は、これはおそらく、各責任者のためのif文を持っている必要がありそう以上であることを知っています。
使用されているCSVの例: