大网数据广告活动
Windows Server 管理

Prepare your development environment

· 52CE 我爱测

Preparing your development environment Windows Admin Center SDK (Project Honolulu)

Let's get started developing extensions with the Windows Admin Center SDK! In this document, we'll cover the process to get your environment up and running to build and test an extension for Windows Admin Center.

Note: New to the Windows Admin Center SDK? Learn more about Extensions for Windows Admin Center

Tip: Create a folder to store all your Windows Admin Center extension development files to reduce command execution.

To prepare your development environment, perform the following steps:

Install prerequisites

To begin developing with the SDK, download and install the following prerequisites:

To bypass signature validation which occurs during extension installation in Windows Admin Center versions running with .NET 8, you should also switch your Windows Admin Center operation mode to "Development." To configure development mode, you must:

  • Open your Windows Admin Center instance's appsettings.json file. This can be found by default at C:\Program Files\WindowsAdminCenter\service\appsettings.json.
  • Modify the OperationMode field under the WindowsAdminCenter/System section to read "Development" instead of "Production."

Install global dependencies

Next, install or update dependencies required for your projects by using Node Package Manager. Install these dependencies globally so all projects can access them.

npm install -g @angular/cli@20.3.25

npm install -g gulp
npm install -g typescript
npm install -g eslint
npm install -g @microsoft/windows-admin-center-sdk@latest

Note: You can install a later version of @angular/cli. However, if you install a version greater than 20.3.25, you see a warning during the gulp build step that the local CLI version doesn't match the installed version.

Prepare your environment for sideloading

After you create your extension, you want to sideload it in Windows Admin Center for testing. To do so, perform the following one-time steps for your extension development directory:

  1. Open PowerShell as an administrator and create a certificate directory:
    New-Item -ItemType Directory -Path "C:<path>\certificate"
    
  2. Generate a self-signed certificate by using Git's OpenSSL:
    & "C:\Program Files\Git\usr\bin\openssl.exe" req -x509 -newkey rsa:2048 -nodes -keyout C:\<path-to-extension-directory>\certificate\localhost.key -out C:\<path-to-extension-directory>\certificate\localhost.cert -days 365 -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost"
    
  3. Import the new certificate into your Trusted Root:
     Import-Certificate -FilePath "C:\<path-to-extension-directory>\certificate\localhost.cert" -CertStoreLocation "Cert:\LocalMachine\Root"
    
  4. Open C:\Program Files\WindowsAdminCenter\Service\appsettings.json in Visual Studio Code as administrator.
  5. Find the corsSites array and add the sideloading URL (port 4200 is the default).
     "CorsSites": [
       "https://localhost:4200"
     ]
    
  6. Find the CSPFrameAncestors array and add the sideloading URL (port 4200 is the default).
     "CSPFrameAncestors": [
       "'self'",
       ... existing entries ...
       "https://localhost:4200"
     ]
    
  7. Save the file, and then restart the Windows Admin Center service in your administrator PowerShell window by running:
      Restart-Service WindowsAdminCenter
    

Important: These instructions reference self-signed certificates for development and testing. Don't use self-signed certificates on production machines for production workloads.

Sideloading by using fully qualified domain name

To sideload your Windows Admin Center extension through a URL that includes your machine's fully qualified domain name (FQDN), follow these additional configuration steps:

  1. Use Git's OpenSSL to generate a self-signed certificate that contains subject alternate names for both localhost and the FQDN:
    & "C:\Program Files\Git\usr\bin\openssl.exe" req -x509 -newkey rsa:2048 -nodes -keyout C:\<path-to-extension-directory>\certificate\localhost.key -out C:\<path-to-extension-directory>\certificate\localhost.cert -days 365 -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost,DNS:<FQDN>"
    
  2. Import the new certificate into your Trusted Root:
     Import-Certificate -FilePath "C:\<path-to-extension-directory>\certificate\localhost.cert" -CertStoreLocation "Cert:\LocalMachine\Root"
    
  3. Update C:\Program Files\WindowsAdminCenter\Service\appsettings.json to include URLs with the FQDN origin:
     "CorsSites": [
       "https://localhost:4200",
       "https://<FQDN>:4200"
     ],
     "CSPFrameAncestors": [
       "'self'",
       ... existing entries ...
       "https://localhost:4200",
       "https://<FQDN>:4200"
     ]
    
  4. Save the file, and then restart the Windows Admin Center service in your administrator PowerShell window by running:
      Restart-Service WindowsAdminCenter
    

Next steps

Now that your environment is prepared, you are ready to start creating content.

SDK design toolkit

Check out our Windows Admin Center SDK design toolkit! This toolkit is designed to help you rapidly mock up extensions in PowerPoint using Windows Admin Center styles, controls, and page templates. See what your extension can look like in Windows Admin Center before you start coding!

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: davannaw-msft). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 08/17/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。