Command Palette

Search for a command to run...

Назад к скиллам
скилл № 57901

ms365-tenant-manager

Generates reviewed PowerShell for Microsoft 365 admin: tenant setup and DNS, bulk provisioning, offboarding, Conditional Access and security audits. Use when…

БесплатноЗапускает вложенные скрипты
borgheiот borghei★ 1 250 звёзд на GitHub

Установить ms365-tenant-manager в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Microsoft 365 Tenant Manager

The agent produces reviewed, reversible PowerShell for Microsoft 365 administration: tenant setup plans and DNS records, bulk provisioning, secure offboarding, Conditional Access and 7-category security audits through Microsoft Graph and Exchange Online. The tools generate scripts from local inputs; they never connect to a tenant, so an administrator stays the one who runs every change.

When to Use

  • New tenant setup: phased checklist, DNS records and a baseline setup script.
  • Security hardening: an audit first, then Conditional Access and MFA policies.
  • Bulk user provisioning from a CSV, or offboarding a departing user.
  • License planning by role, and quarterly utilization review.

Clarify First

Before generating scripts, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

  • Task: setup, audit and hardening, provisioning, or offboarding (selects the subcommand).
  • Tenant inputs: the domain, the users CSV, the tenant config JSON, and the break-glass account to exclude from Conditional Access.
  • Compliance regime: GDPR, HIPAA or none (changes license recommendations and retention steps in offboarding).

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.

Before Applying Any Script

These changes have real blast radius: a bad Conditional Access policy locks everyone out, and offboarding the wrong account cuts off a working employee.

  1. Read the generated script and confirm the tenant, user and SKU values. The generator fills templates; it cannot see your tenant.
  2. Keep a break-glass account (cloud-only, excluded from every CA policy, credentials offline). Without one, a policy mistake has no way back in.
  3. Report-only first. CA policies are created as enabledForReportingButNotEnforced; check sign-in logs before enabling.
  4. Preview with -WhatIf where the script supports it (offboarding), and run bulk jobs on a pilot group of two or three users first.
  5. Check legal hold and retention before offboarding. Mailbox and OneDrive data are converted or archived, not exported; confirm the retention requirement with whoever owns it.
  6. Name the approver. Write down who approved a tenant-wide change and when, so the audit log has an owner.

Workflow

  1. Gather inputs: domain, users CSV (assets/sample_users.csv shows the columns) or tenant config (sample_input.json).
  2. Generate with scripts/ms365_cli.py <subcommand> ... -o file.ps1.
  3. Validation checkpoint: provision validates every user and writes nothing if any row is invalid (exit 1); fix the CSV and rerun.
  4. Apply the checklist above, then hand the script to the administrator to run.
  5. Done when the audit script's reports show the intended state (for example zero users without MFA) and the change is recorded with its approver.

Quick Start

# from engineering/ms365-tenant-manager/
python3 scripts/ms365_cli.py audit --domain contoso.com -o "$(mktemp -d)/audit.ps1"
python3 scripts/ms365_cli.py provision --domain contoso.com --users assets/sample_users.csv | head -40
python3 scripts/ms365_cli.py provision --domain contoso.com --users assets/flawed_users.csv   # exit 1, 2 invalid users
python3 scripts/ms365_cli.py conditional-access --domain contoso.com --exclude [email protected]
python3 scripts/ms365_cli.py offboard --domain contoso.com --user [email protected]
python3 scripts/ms365_cli.py setup --config sample_input.json --part dns
python3 scripts/ms365_cli.py recommend-license --role "Finance Director" --department Finance --format json

Tools Overview

Tool Purpose
scripts/ms365_cli.py CLI: audit, conditional-access, bulk-license, provision, offboard, recommend-license, setup. Writes to stdout or -o FILE; --format json for data subcommands.
scripts/powershell_generator.py Library: audit, Conditional Access and bulk-license script templates (PowerShellScriptGenerator)
scripts/user_management.py Library: provisioning, offboarding, license and group recommendations, user validation (UserLifecycleManager)
scripts/tenant_setup.py Library: setup checklist, DNS records, setup script, license distribution (TenantSetupManager)

Exit codes (ms365_cli.py): 0 output written; 1 provision found invalid users (no script written); 2 unusable input (missing file, bad JSON or CSV, invalid domain or user principal name). License prices are list prices baked into the module; check current Microsoft pricing before quoting them.

Anti-Patterns

Mistake: Enforcing a Conditional Access policy on day one. Why it matters: A policy that blocks legitimate sign-ins takes the whole company offline, admins includ

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • assets/flawed_users.csv
  • assets/sample_users.csv
  • expected_output.json
  • references/operations-and-best-practices.md
  • references/powershell-templates.md
  • references/security-policies.md
  • references/tools-and-workflows.md
  • references/troubleshooting.md
  • sample_input.json
  • scripts/ms365_cli.py
  • scripts/powershell_generator.py
  • scripts/tenant_setup.py
  • scripts/user_management.py

FAQ

Что делает скилл ms365-tenant-manager?

Generates reviewed PowerShell for Microsoft 365 admin: tenant setup and DNS, bulk provisioning, offboarding, Conditional Access and security audits. Use when setting up, hardening or auditing a tenant, or onboarding and offboarding users.

Как установить скилл ms365-tenant-manager?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ms365-tenant-manager запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить ms365-tenant-manager с