> For the complete documentation index, see [llms.txt](https://docs.realmjoin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmjoin.com/ja/zi-dong-hua/runbooks/runbook-references/org/devices/delete-stale-devices_scheduled.md).

# 古いデバイスを削除（スケジュール）

### 説明

このランブックは、定義された日数の間アクティブでなかった Intune 管理対象デバイスを識別します。必要に応じて一致するデバイスを削除でき、メール レポートを送信することもできます。

### 場所

Organization → Devices → 期限切れデバイスの削除（スケジュール）

**完全な Runbook 名**

rjgit-org\_devices\_delete-stale-devices\_scheduled

### アクセス許可

#### アプリケーションのアクセス許可

* **種類**: Microsoft Graph
  * DeviceManagementManagedDevices.ReadWrite.All
  * Directory.Read.All
  * Device.Read.All
  * Mail.Send

### パラメーター

#### 日

期限切れと見なす、アクティビティのない日数

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | 30    |
| 種類    | Int32 |

#### Windows

結果に Windows デバイスを含める

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | True  |
| 種類    | ブール値  |

#### MacOS

結果に macOS デバイスを含める

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | True  |
| 種類    | ブール値  |

#### iOS

結果に iOS デバイスを含める

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | True  |
| 種類    | ブール値  |

#### Android

結果に Android デバイスを含める

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | True  |
| 種類    | ブール値  |

#### DeleteDevices

true に設定すると、スクリプトは期限切れのデバイスを削除します。false の場合は、レポートのみを行います。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | False |
| 種類    | ブール値  |

#### ConfirmDeletion

true に設定すると、スクリプトはデバイスを削除する前に確認を求めます。スケジュール実行では false に設定する必要があります。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | True  |
| 種類    | ブール値  |

#### sendAlertTo

レポートの送信先メール アドレス。

| プロパティ | 値                         |
| ----- | ------------------------- |
| 必須    | false                     |
| 既定値   | <support@glueckkanja.com> |
| 種類    | 文字列                       |

#### sendAlertFrom

レポートの送信元メールアドレス。

| プロパティ | 値                         |
| ----- | ------------------------- |
| 必須    | false                     |
| 既定値   | <runbook@glueckkanja.com> |
| 種類    | 文字列                       |

[Runbook リファレンスの概要に戻る](/ja/zi-dong-hua/runbooks/runbook-references.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.realmjoin.com/ja/zi-dong-hua/runbooks/runbook-references/org/devices/delete-stale-devices_scheduled.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
