macOS でMicrosoft Defender for Endpointを使用してスキャンをスケジュールする

スケジュールされたウイルス対策スキャンは、ユーザーがスキャンを開始するのを頼らずにmacOSデバイスが定期的にスキャンされることを保証します。 セキュリティ管理者は、1時間ごとまたは1日のクイックスキャン、週ごとのクイックスキャンやフルスキャンを設定でき、同じデバイス上で複数のスケジュールを利用できます。 このガイダンスを用いて、モバイルデバイス管理(MDM)プロファイルを通じてスキャンスケジュールを展開するか、 mdatp コマンドラインツールでローカル設定してください。

前提条件

スケジュールされたスキャンの選択肢を理解する

オンデマンドでスキャンを開始することに加え、スキャンは定期的な間隔や特定の時間に実施されるようにスケジュールしてください。 例えば、各勤務日の初めにクイックスキャンを、週に一度フルスキャンをスケジュールします。

Defender for Endpointは、時間単位、日単位、週単位のスケジュールをサポートしています。 時間単位および日単位のスケジュールは素早くスキャンします。 週ごとのスケジュールはクイックスキャンからフルスキャンまで行えます。 3つのスケジュールタイプを同時に設定できます。 毎日および毎週のスキャンの例と、毎時、毎日、毎週のスキャンの例を参照してください。

構成プロファイルを用いたスケジュールスキャン

Defender for Endpointの設定プロファイル内の features 辞書とscheduledScan辞書を使って、スケジュールスキャンを作成します。

Microsoft IntuneおよびJamf Proの例はAppleプロパティリストのXMLを使用しています。 Intuneのプロファイルは .xml 拡張機能で保存し、Jamf Proのプロパティリストは .plist 拡張機能で保存してください。 XML形式の詳細については、 Apple Information Property Listのファイル参照を参照してください。

スキャンスケジュールを定義するには以下の設定を使用します:

ヒント

スケジュールは、デバイスのローカル タイム ゾーンに基づいています。

Setting Description Values デフォルト
features.scheduledScan スケジュールされたスキャン機能のオン・オフを切り替えます。 enabled、disabled disabled 日次または週次構成が存在しない場合
dailyConfiguration.interval 指定された時間ごとに間隔ベースのクイックスキャンを実行します。 0~24。 0 間隔ベースのスキャンを無効にします。 0
dailyConfiguration.timeOfDay 深夜0時過ぎの指定分で毎日クイックスキャンを行います。 0 から 1440 まで 0
weeklyConfiguration.dayOfWeek 週次スキャンの実施時期を指定します。 0:絶対に
1:日曜日
2:月曜日
3:火曜日
4:水曜日
5:木曜日
6:金曜日
7:土曜日
8毎日
0
weeklyConfiguration.timeOfDay 深夜0時以降指定された分数で週に一度スキャンを行います。 0 から 1440 まで プロファイルスキーマ: 0
mdatp コマンドラインインターフェース: 120
weeklyConfiguration.scanType 週次スキャンの種類を指定します。 quick、full quick
ignoreExclusions スケジュールスキャンが設定済み除外事項を無視するかどうかを指定します。 true、false false
lowPriorityScheduledScan CPU優先度を下げたスケジュールスキャンを実行します。 スキャン完了までに時間がかかるかもしれません。 true、false false
checkForDefinitionsUpdate スケジュールされたスキャンを開始する前にセキュリティ情報の更新をチェックします。 true、false false
randomizeScanStartTime 指定時間まで、日次および週次スキャン開始時間をランダム化します。 0 から 23 まで 0
runScanWhenIdle デバイスがアイドル状態になるまで、週に一度のフルスキャンを遅らせます。 true、false false

日々の interval と timeOfDay の設定により、独立したクイックスキャンスケジュールが作成されます。 両方の設定を設定すると、1日に複数回のクイックスキャンが実行されることがあります。

例1:毎日のクイックスキャンと週ごとのフルスキャンをスケジュールします

以下のプロフィールは、毎日のクイックスキャンと水曜日の週ごとのフルスキャンを示しています。 両方のプロファイルは除外を無視し、低優先度のスケジューリングを使用しています。

スケジュールされたスキャン設定テーブルを使って、例の時刻を組織で求められる値に置き換えてください。

テキストエディタを開き、 Intune プロファイルまたは Jamf Proのプロパティリスト をガイドとして使ってください。

Microsoft Intune 向け

以下のサンプルは、毎日のクイックスキャンと週ごとのフルスキャンを可能にする完全なIntune設定プロファイルを定義しています。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>PayloadUUID</key>
    <string>C4E6A782-0C8D-44AB-A025-EB893987A295</string>
    <key>PayloadType</key>
    <string>Configuration</string>
    <key>PayloadOrganization</key>
    <string>Microsoft</string>
    <key>PayloadIdentifier</key>
    <string>C4E6A782-0C8D-44AB-A025-EB893987A295</string>
    <key>PayloadDisplayName</key>
    <string>Microsoft Defender for Endpoint settings</string>
    <key>PayloadDescription</key>
    <string>Microsoft Defender for Endpoint configuration settings</string>
    <key>PayloadVersion</key>
    <integer>1</integer>
    <key>PayloadEnabled</key>
    <true/>
    <key>PayloadRemovalDisallowed</key>
    <true/>
    <key>PayloadScope</key>
    <string>System</string>
    <key>PayloadContent</key>
    <array>
        <dict>
            <key>PayloadUUID</key>
            <string>99DBC2BC-3B3A-46A2-A413-C8F9BB9A7295</string>
            <key>PayloadType</key>
            <string>com.microsoft.wdav</string>
            <key>PayloadOrganization</key>
            <string>Microsoft</string>
            <key>PayloadIdentifier</key>
            <string>99DBC2BC-3B3A-46A2-A413-C8F9BB9A7295</string>
            <key>PayloadDisplayName</key>
            <string>Microsoft Defender for Endpoint configuration settings</string>
            <key>PayloadDescription</key>
            <string/>
            <key>PayloadVersion</key>
            <integer>1</integer>
            <key>PayloadEnabled</key>
            <true/>
            <key>features</key>
            <dict>
                <key>scheduledScan</key>
                <string>enabled</string>
            </dict>
            <key>scheduledScan</key>
            <dict>
                <key>ignoreExclusions</key>
                <true/>
                <key>lowPriorityScheduledScan</key>
                <true/>
                <key>dailyConfiguration</key>
                <dict>
                    <key>timeOfDay</key>
                    <integer>880</integer>
                </dict>
                <key>weeklyConfiguration</key>
                <dict>
                    <key>dayOfWeek</key>
                    <integer>4</integer>
                    <key>timeOfDay</key>
                    <integer>885</integer>
                    <key>scanType</key>
                    <string>full</string>
                </dict>
            </dict>
        </dict>
    </array>
</dict>
</plist>

ファイルを com.microsoft.wdav.xmlとして保存します。

Jamf Proおよび対応MDMソリューション用

以下の物件リストは、Jamf Proおよび物件リストを受け入れる他のMDMソリューションに対して、毎日のクイックスキャンと週ごとのフルスキャンを設定します。 内容を com.microsoft.wdav.plistとして保存してください。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>features</key>
    <dict>
        <key>scheduledScan</key>
        <string>enabled</string>
    </dict>
    <key>scheduledScan</key>
    <dict>
        <key>ignoreExclusions</key>
        <true/>
        <key>lowPriorityScheduledScan</key>
        <true/>
        <key>dailyConfiguration</key>
        <dict>
            <key>timeOfDay</key>
            <integer>885</integer>
        </dict>
        <key>weeklyConfiguration</key>
        <dict>
            <key>dayOfWeek</key>
            <integer>4</integer>
            <key>timeOfDay</key>
            <integer>880</integer>
            <key>scanType</key>
            <string>full</string>
        </dict>
    </dict>
</dict>
</plist>

ファイルを com.microsoft.wdav.plistとして保存します。

プロファイルを展開した後、次のコマンドを実行してスケジュールされたスキャンが管理された優先設定になっているか確認してください:

mdatp health --details scheduled_scan

結果で、スケジュール済みのスキャンが managed と表示されることを確認してください。

例2:間隔単位のクイックスキャンと毎日のクイックスキャン、そして週1回のフルスキャンをスケジュールする

以下のプロフィールは、間隔ベースのクイックスキャン、毎日のクイックスキャン、そして水曜日の週ごとのフルスキャンを示しています。

テキストエディタを開き、 Intune プロファイルまたは Jamf Proのプロパティリスト をガイドとして使ってください。

Microsoft Intune 向け

以下のサンプルは、スケジュールされたスキャン設定を完全なIntune構成プロファイルにまとめています。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
     <key>PayloadUUID</key>
     <string>C4E6A782-0C8D-44AB-A025-EB893987A295</string>
     <key>PayloadType</key>
     <string>Configuration</string>
     <key>PayloadOrganization</key>
     <string>Microsoft</string>
     <key>PayloadIdentifier</key>
     <string>C4E6A782-0C8D-44AB-A025-EB893987A295</string>
     <key>PayloadDisplayName</key>
     <string>Microsoft Defender for Endpoint settings</string>
     <key>PayloadDescription</key>
     <string>Microsoft Defender for Endpoint configuration settings</string>
     <key>PayloadVersion</key>
     <integer>1</integer>
     <key>PayloadEnabled</key>
     <true/>
     <key>PayloadRemovalDisallowed</key>
     <true/>
     <key>PayloadScope</key>
     <string>System</string>
     <key>PayloadContent</key>
     <array>
       <dict>
           <key>PayloadUUID</key>
           <string>99DBC2BC-3B3A-46A2-A413-C8F9BB9A7295</string>
           <key>PayloadType</key>
           <string>com.microsoft.wdav</string>
           <key>PayloadOrganization</key>
           <string>Microsoft</string>
           <key>PayloadIdentifier</key>
           <string>99DBC2BC-3B3A-46A2-A413-C8F9BB9A7295</string>
           <key>PayloadDisplayName</key>
           <string>Microsoft Defender for Endpoint configuration settings</string>
           <key>PayloadDescription</key>
           <string/>
           <key>PayloadVersion</key>
           <integer>1</integer>
           <key>PayloadEnabled</key>
           <true/>
    <key>features</key>
    <dict>
        <key>scheduledScan</key>
        <string>enabled</string>
    </dict>
<key>scheduledScan</key>
<dict>
    <key>ignoreExclusions</key>
    <true/>
    <key>lowPriorityScheduledScan</key>
    <true/>
    <key>dailyConfiguration</key>
    <dict>
        <key>timeOfDay</key>
        <integer>885</integer>
        <key>interval</key>
        <integer>1</integer>
    </dict>
    <key>weeklyConfiguration</key>
    <dict>
        <key>dayOfWeek</key>
        <integer>4</integer>
        <key>timeOfDay</key>
        <integer>880</integer>
        <key>scanType</key>
        <string>full</string>
        </dict>
        </dict>
    </dict>
</array>
</dict>
</plist>

ファイルを com.microsoft.wdav.xmlとして保存します。

Jamf Proおよび対応MDMソリューション用

以下のプロパティリストは、Jamf Proおよびプロパティリストを受け入れる他のMDMソリューションの間隔ベース、日次、週次スキャンを構成しています。 内容を com.microsoft.wdav.plistとして保存してください。

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>features</key>
        <dict>
            <key>scheduledScan</key>
            <string>enabled</string>
        </dict>
    <key>scheduledScan</key>
    <dict>
        <key>ignoreExclusions</key>
        <true/>
        <key>lowPriorityScheduledScan</key>
        <true/>
        <key>dailyConfiguration</key>
        <dict>
            <key>timeOfDay</key>
            <integer>885</integer>
            <key>interval</key>
            <integer>1</integer>
        </dict>
        <key>weeklyConfiguration</key>
        <dict>
            <key>dayOfWeek</key>
            <integer>4</integer>
            <key>timeOfDay</key>
            <integer>880</integer>
            <key>scanType</key>
            <string>full</string>
            </dict>
            </dict>
        </dict>
    </plist>

ファイルを com.microsoft.wdav.plistとして保存します。

構成プロファイルを展開します

Microsoft Intune を使用して展開する

Microsoft Intuneは、エンドポイント機能のDefenderを構成してデバイスに配布するための推奨ツールです。 ただし、Intune はエンドポイントのDefenderの一部ではない別個の製品であり、すべてのサブスクリプションに含まれているわけではありません。 Intune を使用するには、Intune を含むサブスクリプションが必要です。または、スタンドアロン サブスクリプションまたはアドオンとして個別に購入することもできます。 Intune をお持ちでない場合は、この記事の他の方法のいずれかを使用できます。 詳細については、「Microsoft Intune のライセンス」を参照してください。

Intuneでカスタム設定プロファイルを作成・展開するには、「Microsoft Intuneのポリシー設定」をご覧ください。 com.microsoft.wdavを設定プロファイル名として使い、デバイスチャネルを選択し、.xmlファイルをアップロードします。

Jamf Proでの展開

Jamf Proは別のサードパーティ製品で、Defender for Endpointの一部ではなく、Defender for Endpointのサブスクリプションにも含まれていません。 Jamf Proを使用するには、組織内で別のJamf Proサブスクリプションが必要です。 製品およびサブスクリプション情報については、 Jamf Proをご覧ください。 もし御社でJamf Proを使用していない場合は、この記事の別の設定方法を使ってください。

維持されているDefender for Endpointのワークフローについては、「macOSにJamf Proを搭載してMicrosoft Defender for Endpointをデプロイする」をご覧ください。

Jamfの指示に従って カスタムコンピュータ構成プロファイルを展開してください。 例1または例2のプロパティリストを使い、プリファレンスドメインをcom.microsoft.wdavに設定します。

プロパティリストペイロードをサポートするMDMソリューションの場合は、プロバイダーの指示とDeploy Microsoft Defender for Endpointのプロファイル展開ガイダンスに従い、macOS上で別のMDMソリューションと連携してください。

Jamf Proがプロファイルを展開した後、以下のコマンドを実行してスケジュールされたスキャン設定を確認します:

mdatp health --details scheduled_scan

結果で、スケジュールされたスキャンが managed と報告されていることを確認してください。

mdatp CLIでスケジュールスキャンを設定してください

ターミナルからローカルでスケジュールスキャンを設定するには、Microsoft Defender for Endpointコマンドラインツール(mdatp)を使いましょう。 コマンドライン構成はテストや個別デバイスに最も有効です。 マネージドデプロイメントにはMDMプロファイルを使用してください。

スケジュールスキャン機能を有効にする:

sudo mdatp config scheduled-scan settings feature --value enabled

間隔ベースのクイックスキャンを設定する:

sudo mdatp config scheduled-scan quick-scan hourly-interval --value <arg>

mdatpの時間間隔コマンドヘルプのスクリーンショットで、0から24時間までの値を表示しています。

毎日のクイックスキャンを設定する:

sudo mdatp config scheduled-scan quick-scan time-of-day --value <arg>

午前0時からの経過分数が0~1440であることを示す、mdatp の daily scan コマンドのヘルプのスクリーンショット。

週次スキャンの設定:

sudo mdatp config scheduled-scan weekly-scan --day-of-week <arg> --time-of-day <arg> --scan-type <arg>

mdatp週間スキャンコマンドヘルプのスクリーンショットで、日付、時間、スキャンタイプのオプションが表示されます。

また、セキュリティインテリジェンスの更新や低優先度の実行を設定することもできます:

  • 定期的なスキャン前にセキュリティ情報の更新を確認するために:

    sudo mdatp config scheduled-scan settings check-for-definitions --value true
    
  • スケジュールされたスキャンに優先度の低いスレッドを使用するには:

    sudo mdatp config scheduled-scan settings low-priority --value true
    

スケジュールされたスキャンが実行されているか確認してください

完了したスケジュールされたスキャンとその結果を一覧表示するには、 mdatp scan listを実行します。

ターミナルに入力したmdatpスキャンリストコマンドのスクリーンショットです。

完了したクイックスキャンのスクリーンショットで、成功した状態、所要時間、スキャンしたファイル、脅威の検出を示しています。

重要

デバイスが予定された時間にスリープ状態にある場合、デバイスが再開した後にスキャンが実行されます。 機器が電源を切っている場合、スキャンは次の予定時刻に行われます。