{
    "api_version": "1",
    "kind": "dse_post",
    "self": "https://update.dsesecurity.com/api/v1/posts/dse-20260909-196-make-intune-macos-shell-scripts-safe-for-parallel-and-repeated-execution/",
    "item": {
        "id": "https://update.dsesecurity.com/updates/dse-20260909-196-make-intune-macos-shell-scripts-safe-for-parallel-and-repeated-execution/",
        "slug": "dse-20260909-196-make-intune-macos-shell-scripts-safe-for-parallel-and-repeated-execution",
        "url": "https://update.dsesecurity.com/updates/dse-20260909-196-make-intune-macos-shell-scripts-safe-for-parallel-and-repeated-execution/",
        "alternate_urls": {
            "markdown": "https://update.dsesecurity.com/updates/dse-20260909-196-make-intune-macos-shell-scripts-safe-for-parallel-and-repeated-execution.md",
            "json": "https://update.dsesecurity.com/api/v1/posts/dse-20260909-196-make-intune-macos-shell-scripts-safe-for-parallel-and-repeated-execution/"
        },
        "title": "Make Intune macOS shell scripts safe for parallel and repeated execution",
        "summary": "Can a macOS management script tolerate concurrent runs and the chosen user context?",
        "format": {
            "slug": "guide",
            "name": "Guide"
        },
        "priority": {
            "slug": "info",
            "name": "Information"
        },
        "featured": false,
        "image": {
            "theme": "identity-cloud",
            "label": "Identity & cloud",
            "alt": "Governed cloud identity system with connected service and lifecycle nodes.",
            "card_url": "https://update.dsesecurity.com/assets/editorial/identity-cloud-card.webp?v=1.8.20",
            "hero_url": "https://update.dsesecurity.com/assets/editorial/identity-cloud-hero.webp?v=1.8.20",
            "social_url": "https://update.dsesecurity.com/assets/editorial/identity-cloud-social-v2.jpg?v=1.8.20",
            "width": 2400,
            "height": 1350
        },
        "topics": [
            {
                "slug": "business-continuity",
                "name": "Business Continuity",
                "url": "https://update.dsesecurity.com/topic/business-continuity/"
            },
            {
                "slug": "it",
                "name": "IT",
                "url": "https://update.dsesecurity.com/topic/it/"
            }
        ],
        "author": {
            "name": "DSE Security Editorial Team",
            "url": "https://update.dsesecurity.com/#editorial-team",
            "type": "Organization"
        },
        "publisher": {
            "name": "Detection Systems & Engineering",
            "url": "https://dsesecurity.com/"
        },
        "published_at": "2026-09-10T00:28:40+00:00",
        "modified_at": "2026-09-10T00:55:36+00:00",
        "reviewed_on": "2026-09-09",
        "reading_minutes": 2,
        "word_count": 231,
        "potentially_affected": "Confirm supported macOS, the installed management agent, and the required shell interpreter. Determine whether the proposed action belongs to the device or to each signed-in user before choosing execution context.",
        "dse_recommendation": "Review the script for repeated side effects, shared temporary paths, and assumptions that another script has already finished.",
        "primary_source": {
            "name": "Use Shell Scripts on macOS Devices in Microsoft Intune - Microsoft Intune | Microsoft Learn",
            "url": "https://learn.microsoft.com/en-us/intune/device-management/tools/run-shell-scripts-macos",
            "published_on": null,
            "authority": "Microsoft Learn"
        },
        "publishing_principles": "https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/",
        "usage_info": "https://update.dsesecurity.com/usage/",
        "copyright_notice": "Copyright © 2026 Detection Systems & Engineering. All rights reserved.",
        "content_html": "<h2>Source facts</h2>\n<p>Intune runs macOS shell scripts as separate parallel processes. A script configured for signed-in users runs for every currently signed-in account, while the default setting runs as root. Certain conditions can trigger runs more frequently than the selected frequency. Scripts exceeding 60 minutes are stopped and reported failed. Microsoft requires direct internet connectivity; proxy connections are unsupported. <a href=\"https://learn.microsoft.com/en-us/intune/device-management/tools/run-shell-scripts-macos\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft Learn</a>.</p>\n<h2>Applicability</h2>\n<p>Confirm supported macOS, the installed management agent, and the required shell interpreter. Determine whether the proposed action belongs to the device or to each signed-in user before choosing execution context.</p>\n<h2>DSE recommendation</h2>\n<p>Review the script for repeated side effects, shared temporary paths, and assumptions that another script has already finished. Require an explicit reason for root execution. Design state checks so an already-correct device needs no further change, and define a clear exit result when a prerequisite is absent. Avoid making one independent assignment a hidden prerequisite for another.</p>\n<h2>Verification</h2>\n<p>Rehearse the script on a test Mac with representative account and sign-in conditions. Run the intended operation again and check for duplicate configuration, unintended file changes, or conflicting concurrent activity. Compare the script’s exit result with the actual requested state; a zero exit code alone should not be the team’s acceptance criterion. Keep sanitized local evidence and the reviewed script version with the deployment record.</p>\n<h2>Official references</h2>\n<p><a href=\"https://learn.microsoft.com/en-us/intune/device-management/tools/run-shell-scripts-macos\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft Learn: Use Shell Scripts on macOS Devices in Microsoft Intune</a>.</p>",
        "content_text": "Source facts\nIntune runs macOS shell scripts as separate parallel processes. A script configured for signed-in users runs for every currently signed-in account, while the default setting runs as root. Certain conditions can trigger runs more frequently than the selected frequency. Scripts exceeding 60 minutes are stopped and reported failed. Microsoft requires direct internet connectivity; proxy connections are unsupported. Microsoft Learn.\nApplicability\nConfirm supported macOS, the installed management agent, and the required shell interpreter. Determine whether the proposed action belongs to the device or to each signed-in user before choosing execution context.\nDSE recommendation\nReview the script for repeated side effects, shared temporary paths, and assumptions that another script has already finished. Require an explicit reason for root execution. Design state checks so an already-correct device needs no further change, and define a clear exit result when a prerequisite is absent. Avoid making one independent assignment a hidden prerequisite for another.\nVerification\nRehearse the script on a test Mac with representative account and sign-in conditions. Run the intended operation again and check for duplicate configuration, unintended file changes, or conflicting concurrent activity. Compare the script’s exit result with the actual requested state; a zero exit code alone should not be the team’s acceptance criterion. Keep sanitized local evidence and the reviewed script version with the deployment record.\nOfficial references\nMicrosoft Learn: Use Shell Scripts on macOS Devices in Microsoft Intune.",
        "content_markdown": "## Source facts\n\nIntune runs macOS shell scripts as separate parallel processes. A script configured for signed-in users runs for every currently signed-in account, while the default setting runs as root. Certain conditions can trigger runs more frequently than the selected frequency. Scripts exceeding 60 minutes are stopped and reported failed. Microsoft requires direct internet connectivity; proxy connections are unsupported. [Microsoft Learn](https://learn.microsoft.com/en-us/intune/device-management/tools/run-shell-scripts-macos).\n\n## Applicability\n\nConfirm supported macOS, the installed management agent, and the required shell interpreter. Determine whether the proposed action belongs to the device or to each signed-in user before choosing execution context.\n\n## DSE recommendation\n\nReview the script for repeated side effects, shared temporary paths, and assumptions that another script has already finished. Require an explicit reason for root execution. Design state checks so an already-correct device needs no further change, and define a clear exit result when a prerequisite is absent. Avoid making one independent assignment a hidden prerequisite for another.\n\n## Verification\n\nRehearse the script on a test Mac with representative account and sign-in conditions. Run the intended operation again and check for duplicate configuration, unintended file changes, or conflicting concurrent activity. Compare the script’s exit result with the actual requested state; a zero exit code alone should not be the team’s acceptance criterion. Keep sanitized local evidence and the reviewed script version with the deployment record.\n\n## Official references\n\n[Microsoft Learn: Use Shell Scripts on macOS Devices in Microsoft Intune](https://learn.microsoft.com/en-us/intune/device-management/tools/run-shell-scripts-macos)."
    },
    "json_ld": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://dsesecurity.com/#organization",
                "name": "Detection Systems & Engineering",
                "alternateName": "DSE Security",
                "url": "https://dsesecurity.com/",
                "logo": {
                    "@type": "ImageObject",
                    "url": "https://update.dsesecurity.com/assets/dse-logo-20260812.png?v=1.8.20"
                }
            },
            {
                "@type": "Organization",
                "@id": "https://update.dsesecurity.com/#editorial-team",
                "name": "DSE Security Editorial Team",
                "url": "https://update.dsesecurity.com/",
                "parentOrganization": {
                    "@id": "https://dsesecurity.com/#organization"
                }
            },
            {
                "@type": "WebSite",
                "@id": "https://update.dsesecurity.com/#website",
                "name": "DSE Updates",
                "alternateName": "DSE Security Knowledge Hub",
                "url": "https://update.dsesecurity.com/",
                "inLanguage": "en-US",
                "publisher": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "potentialAction": {
                    "@type": "SearchAction",
                    "target": {
                        "@type": "EntryPoint",
                        "urlTemplate": "https://update.dsesecurity.com/?q={search_term_string}"
                    },
                    "query-input": "required name=search_term_string"
                }
            },
            {
                "@type": "WebPage",
                "@id": "https://update.dsesecurity.com/updates/dse-20260909-196-make-intune-macos-shell-scripts-safe-for-parallel-and-repeated-execution/",
                "url": "https://update.dsesecurity.com/updates/dse-20260909-196-make-intune-macos-shell-scripts-safe-for-parallel-and-repeated-execution/",
                "isPartOf": {
                    "@id": "https://update.dsesecurity.com/#website"
                },
                "lastReviewed": "2026-09-09"
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://update.dsesecurity.com/updates/dse-20260909-196-make-intune-macos-shell-scripts-safe-for-parallel-and-repeated-execution/#breadcrumbs",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "DSE Updates",
                        "item": "https://update.dsesecurity.com/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Make Intune macOS shell scripts safe for parallel and repeated execution",
                        "item": "https://update.dsesecurity.com/updates/dse-20260909-196-make-intune-macos-shell-scripts-safe-for-parallel-and-repeated-execution/"
                    }
                ]
            },
            {
                "@type": [
                    "Article",
                    "TechArticle"
                ],
                "@id": "https://update.dsesecurity.com/updates/dse-20260909-196-make-intune-macos-shell-scripts-safe-for-parallel-and-repeated-execution/#article",
                "identifier": "https://update.dsesecurity.com/updates/dse-20260909-196-make-intune-macos-shell-scripts-safe-for-parallel-and-repeated-execution/",
                "url": "https://update.dsesecurity.com/updates/dse-20260909-196-make-intune-macos-shell-scripts-safe-for-parallel-and-repeated-execution/",
                "headline": "Make Intune macOS shell scripts safe for parallel and repeated execution",
                "description": "Can a macOS management script tolerate concurrent runs and the chosen user context?",
                "abstract": "Can a macOS management script tolerate concurrent runs and the chosen user context?",
                "articleBody": "Source facts\nIntune runs macOS shell scripts as separate parallel processes. A script configured for signed-in users runs for every currently signed-in account, while the default setting runs as root. Certain conditions can trigger runs more frequently than the selected frequency. Scripts exceeding 60 minutes are stopped and reported failed. Microsoft requires direct internet connectivity; proxy connections are unsupported. Microsoft Learn.\nApplicability\nConfirm supported macOS, the installed management agent, and the required shell interpreter. Determine whether the proposed action belongs to the device or to each signed-in user before choosing execution context.\nDSE recommendation\nReview the script for repeated side effects, shared temporary paths, and assumptions that another script has already finished. Require an explicit reason for root execution. Design state checks so an already-correct device needs no further change, and define a clear exit result when a prerequisite is absent. Avoid making one independent assignment a hidden prerequisite for another.\nVerification\nRehearse the script on a test Mac with representative account and sign-in conditions. Run the intended operation again and check for duplicate configuration, unintended file changes, or conflicting concurrent activity. Compare the script’s exit result with the actual requested state; a zero exit code alone should not be the team’s acceptance criterion. Keep sanitized local evidence and the reviewed script version with the deployment record.\nOfficial references\nMicrosoft Learn: Use Shell Scripts on macOS Devices in Microsoft Intune.",
                "datePublished": "2026-09-10T00:28:40+00:00",
                "dateModified": "2026-09-10T00:55:36+00:00",
                "mainEntityOfPage": {
                    "@id": "https://update.dsesecurity.com/updates/dse-20260909-196-make-intune-macos-shell-scripts-safe-for-parallel-and-repeated-execution/"
                },
                "inLanguage": "en-US",
                "isAccessibleForFree": true,
                "author": {
                    "@type": "Organization",
                    "name": "DSE Security Editorial Team",
                    "url": "https://update.dsesecurity.com/#editorial-team"
                },
                "publisher": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "image": {
                    "@type": "ImageObject",
                    "@id": "https://update.dsesecurity.com/updates/dse-20260909-196-make-intune-macos-shell-scripts-safe-for-parallel-and-repeated-execution/#primaryimage",
                    "url": "https://update.dsesecurity.com/assets/editorial/identity-cloud-social-v2.jpg?v=1.8.20",
                    "contentUrl": "https://update.dsesecurity.com/assets/editorial/identity-cloud-social-v2.jpg?v=1.8.20",
                    "width": 1200,
                    "height": 630,
                    "caption": "Make Intune macOS shell scripts safe for parallel and repeated execution"
                },
                "articleSection": [
                    "Business Continuity",
                    "IT"
                ],
                "keywords": [
                    "Business Continuity",
                    "IT",
                    "Guide",
                    "Information priority"
                ],
                "genre": "Guide",
                "about": [
                    {
                        "@type": "Thing",
                        "name": "Business Continuity",
                        "url": "https://update.dsesecurity.com/topic/business-continuity/"
                    },
                    {
                        "@type": "Thing",
                        "name": "IT",
                        "url": "https://update.dsesecurity.com/topic/it/"
                    }
                ],
                "wordCount": 231,
                "timeRequired": "PT2M",
                "publishingPrinciples": "https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/",
                "usageInfo": "https://update.dsesecurity.com/usage/",
                "copyrightHolder": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "copyrightNotice": "Copyright © 2026 Detection Systems & Engineering. All rights reserved.",
                "citation": {
                    "@type": "CreativeWork",
                    "name": "Use Shell Scripts on macOS Devices in Microsoft Intune - Microsoft Intune | Microsoft Learn",
                    "url": "https://learn.microsoft.com/en-us/intune/device-management/tools/run-shell-scripts-macos"
                }
            }
        ]
    }
}