---
id: post/aardvarklabs-blog/4023
type: post
title: Automate Business Central Extension Deployment with PowerShell and the Admin API
summary: PowerShell automation script that deploys Business Central extensions to production by sorting them by dependencies, checking installed versions, and monitoring installation status through the Admin API. Useful when deploying multiple extensions from UAT environments or performing large-scale updates.
tier: community
language: en
tags:
  - extension deployment
  - powershell automation
  - admin api
  - dependency management
  - version control
  - uat to production
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-07T23:46:22.313Z"
  flags: []
generated:
  at: "2026-10-07T22:42:12.892Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: e91d05e294e9b7a5c7d049996049d8e5998c369edd93ff0c749604ca474cc628
evidence:
  - kind: blog
    url: https://aardvarklabs.blog/2026/09/25/automate-business-central-extension-deployment-with-powershell-and-the-admin-api/
    title: Automate Business Central Extension Deployment with PowerShell and the Admin API
    date: "2026-09-25"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://aardvarklabs.blog/2026/09/25/automate-business-central-extension-deployment-with-powershell-and-the-admin-api/
    title: Automate Business Central Extension Deployment with PowerShell and the Admin API
    date: "2026-09-25"
    commit: null
    t: null
    quote: Business Central extensions often depend on other extensions. Installing them in the wrong order can cause failures.
  - kind: blog
    url: https://aardvarklabs.blog/2026/09/25/automate-business-central-extension-deployment-with-powershell-and-the-admin-api/
    title: Automate Business Central Extension Deployment with PowerShell and the Admin API
    date: "2026-09-25"
    commit: null
    t: null
    quote: With this script in place, deploying Business Central extensions becomes predictable, repeatable, and, most importantly, unattended.
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "4023"
source_id: aardvarklabs-blog
source_name: Aardvark Labs
url: https://aardvarklabs.blog/2026/09/25/automate-business-central-extension-deployment-with-powershell-and-the-admin-api/
published_at: "2026-09-25T12:00:00.000Z"
author: Marcel Chabot
full_text: false
words: 1925
quotes:
  - text: Business Central extensions often depend on other extensions. Installing them in the wrong order can cause failures.
    why_it_matters: Explains why dependency sorting is critical and why the topological sort algorithm is necessary
  - text: With this script in place, deploying Business Central extensions becomes predictable, repeatable, and, most importantly, unattended.
    why_it_matters: "States the primary benefit: eliminating manual deployment work and reducing human error"
code_objects_mentioned: []
systems:
  - development
  - integration
  - administration
versions_mentioned:
  - Admin API v2.29
preview:
  embeddable: true
  frame_url: https://aardvarklabs.blog/2026/09/25/automate-business-central-extension-deployment-with-powershell-and-the-admin-api/embed/
  image: https://i0.wp.com/aardvarklabs.blog/wp-content/uploads/2026/09/copilot_20260922_220724.png?fit=1200%2C800&ssl=1
  image_alt: null
  image_w: 1200
  image_h: 800
  site_name: Aardvark Labs
  favicon: https://aardvarklabs.blog/wp-content/uploads/2024/04/design-1.png?w=32
  probed_at: "2026-10-07T11:50:03.778Z"
---

# Automate Business Central Extension Deployment with PowerShell and the Admin API

[Read the post](https://aardvarklabs.blog/2026/09/25/automate-business-central-extension-deployment-with-powershell-and-the-admin-api/) · Aardvark Labs (Marcel Chabot) · 2026-09-25 · 1925 words · tier community · reviewed (checked by Opus)

> PowerShell automation script that deploys Business Central extensions to production by sorting them by dependencies, checking installed versions, and monitoring installation status through the Admin API. Useful when deploying multiple extensions from UAT environments or performing large-scale updates.

## Key points

- Script handles dependency resolution by extracting metadata from .app files and performing topological sorting to determine correct install order
- Version comparison prevents downgrading extensions by checking installed versions against incoming packages
- Automated monitoring polls the Admin API until installation succeeds or fails, eliminating manual oversight
- Multi-step process includes authentication via OAuth2, metadata extraction using 7-Zip, and multipart form-data uploads
- Circular dependency detection throws errors to prevent infinite loops during dependency graph traversal

## Quotes

- "Business Central extensions often depend on other extensions. Installing them in the wrong order can cause failures." (Explains why dependency sorting is critical and why the topological sort algorithm is necessary)
- "With this script in place, deploying Business Central extensions becomes predictable, repeatable, and, most importantly, unattended." (States the primary benefit: eliminating manual deployment work and reducing human error)

## Context

- Features: Admin API pteInstall endpoint, OAuth2 client credentials authentication, Topological dependency sorting, Version comparison, Installation status monitoring, NavxManifest.xml metadata extraction, Multipart form-data upload, Circular dependency detection
- Versions: Admin API v2.29

Source: Aardvark Labs, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
