Azure Arc bulk onboarding CSV and logging starter
Reusable starter for Azure Arc onboarding waves using a host CSV, dry-run expectations, per-host logging, and repeatable result tracking suitable for tickets, change records, and post-wave reporting.
Good For
- Planning Azure Arc onboarding by server wave
- Standardizing per-host evidence and outcomes
- Dry-run review before running onboarding at scale
- Producing CSV and log artifacts for change tickets
How to Use It
- Prepare onboarding wave CSV: Create one CSV per wave, named with change or wave identifier, for example arc-onboarding-wave01.csv. Use required columns: WaveId, Hostname, FQDN, OS, DomainOrWorkgroup, Environment, BusinessOwner, ServerOwner, SubscriptionId, TenantId, ResourceGroup, Location, Tags, OnboardingMethod, ConnectivityCheck, PrereqStatus, MaintenanceWindow, ChangeTicket, Notes. Recommended values for OnboardingMethod: Manual, Script, GPO, ConfigMgmt. Recommended values for ConnectivityCheck and PrereqStatus: Pass, Fail, Unknown. Store the CSV with a matching results file and a master log path defined before execution.
- Record dry-run review expectations: Before any onboarding attempt, populate ConnectivityCheck and PrereqStatus from validation work, not assumptions. Mark servers with missing subscription, resource group, or location data as Hold. Define expected outcome per host in Notes, such as ReadyForOnboarding, MissingProxy, NeedsOwnerApproval, or ExcludedLegacyOS. Confirm tagging standard is agreed before execution to avoid inconsistent resource metadata after onboarding.
- Use a per-host execution log schema: Create a results CSV for operators to append one row per host attempt. Required result fields: TimestampUtc, WaveId, Hostname, FQDN, Operator, Result, FailureStage, ArcMachineName, AzureResourceId, SubscriptionId, ResourceGroup, Location, ErrorSummary, RetryRecommended, LogPath, ChangeTicket. Recommended Result values: Success, DryRunOnly, Skipped, Failed, Partial. Recommended FailureStage values: Precheck, Connectivity, Auth, AgentInstall, Registration, Tagging, PostValidation.
- Capture master log and host log conventions: Create a master log for the wave and optional per-host logs under a predictable path such as .\logs\wave01\HOSTNAME.log. Every log entry should include UTC timestamp, wave ID, hostname, stage, message, and outcome. If using a script later, preserve the same fields so historical waves remain comparable. Keep ticket or change reference in both CSV and logs for audit traceability.
- Produce end-of-wave report artifacts: Summarize total hosts, attempted, succeeded, failed, skipped, and pending retry. List failed hosts with concise error summaries and next action owners. Export a clean results CSV for the ticket and retain the raw master log alongside it. Optionally reserve a future HTML report field set matching the results CSV to avoid rework later.
Execution Modes
- remote-host-list
Inputs and Outputs
Inputs
- Source server wave CSV - fields: WaveId, Hostname, FQDN, OS, DomainOrWorkgroup, Environment, BusinessOwner, ServerOwner, SubscriptionId, TenantId, ResourceGroup, Location, Tags, OnboardingMethod, ConnectivityCheck, PrereqStatus, MaintenanceWindow, ChangeTicket, Notes
- Results CSV - fields: TimestampUtc, WaveId, Hostname, FQDN, Operator, Result, FailureStage, ArcMachineName, AzureResourceId, SubscriptionId, ResourceGroup, Location, ErrorSummary, RetryRecommended, LogPath, ChangeTicket
- Master log entry format - fields: TimestampUtc, WaveId, Hostname, Stage, Message, Outcome, Operator
Outputs
- verbose-console
- operator-notes
Command Starter
Safe to run: read-only
Import-Csv .\arc-onboarding-wave01.csv | Format-Table Hostname,OS,ResourceGroup,SubscriptionId,Location,ConnectivityCheck,PrereqStatus -Auto
Import-Csv .\arc-onboarding-wave01.csv | Group-Object ResourceGroup,Location | Select-Object Count,Name
Get-Content .\logs\arc-wave01-master.log -Tail 50
Import-Csv .\results\arc-wave01-results.csv | Group-Object Result | Select-Object Count,Name
Import-Csv .\results\arc-wave01-results.csv | Where-Object {$_.Result -ne 'Success'} | Format-Table Hostname,Result,FailureStage,ErrorSummary -AutoValidation
- CSV contains no blank Hostname, SubscriptionId, ResourceGroup, or Location values for hosts marked ReadyForOnboarding.
- WaveId matches across source CSV, result rows, and master log entries.
- Result values are limited to Success, DryRunOnly, Skipped, Failed, or Partial and FailureStage values are from the defined list.
- Each successful host has both ArcMachineName and AzureResourceId populated in the results CSV.
Reporting
- Ticket summary: WaveId, maintenance window, operator, total hosts, success count, failure count, skipped count, retry count.
- Failure appendix: Hostname, FailureStage, ErrorSummary, RetryRecommended, next owner.
- Evidence pack: source CSV name, results CSV name, master log path, execution date in UTC.
- Management rollup: counts by environment, resource group, and result.
Safety Notes
- This template is planning and evidence focused; do not mark a host ReadyForOnboarding without explicit connectivity and prerequisite checks.
- Do not place secrets, passwords, or tokens in the CSV, logs, or Notes field.
- Keep naming stable across wave files; changing hostname or wave ID mid-run makes result reconciliation unreliable.
- If onboarding is executed by a later script, test against a small pilot wave first and preserve the same result schema.