Установка расширений и управление ими
Windows Admin Center создан в качестве расширяемой платформы, в которой каждый тип подключения и средство — это расширение, которое можно по отдельности установить, удалить и обновить. Вы можете искать новые расширения, опубликованные корпорацией Майкрософт и другими разработчиками, а также устанавливать и обновлять их по отдельности, не обновляя всей установки Windows Admin Center. Вы можете также настроить отдельный веб-канал NuGet или общую папку и распространить расширения, чтобы использовать их внутри организации.
Установка расширения
В Windows Admin Center будут отображаться расширения, доступные в указанном веб-канале NuGet. По умолчанию Центр администрирования Windows Admin Center указывает на официальный веб-канал NuGet Microsoft, в котором размещаются расширения, опубликованные корпорацией Майкрософт и другими разработчиками.
- Нажмите кнопку Параметры вверху правой > в левой области, щелкните Расширения.
- На вкладке Доступные расширения будут перечислены расширения веб-канала, которые можно установить.
- Щелкните расширение, чтобы просмотреть его описание, версию, издателя и другие сведения в области Сведения.
- Нажмите Установить, чтобы установить расширение. Если для внесения этого изменения шлюз должен работать в режиме с повышенными привилегиями, появится запрос на повышение прав UAC. После завершения установки браузер будет автоматически обновлен, а Windows Admin Center перезагрузится, после чего в нем появится установленное расширение. Если расширение, которое вы пытаетесь установить, является обновлением ранее установленного расширения, для установки обновления можно использовать кнопку Обновление до последней версии. Вы также можете перейти на вкладку Установленные расширения, чтобы просмотреть установленные расширения и проверить, доступно ли обновление в колонке Состояние.
Установка расширений из разных веб-каналов
Windows Admin Center поддерживает несколько веб-каналов, поэтому вы можете просматривать пакеты и управлять ими одновременно из нескольких каналов. Любой канал NuGet, поддерживающий API NuGet версии 2 или общую папку, можно добавить в Windows Admin Center, чтобы устанавливать из него расширения.
- Нажмите кнопку Параметры вверху правой > в левой области, щелкните Расширения.
- В правой области перейдите на вкладку Веб-каналы.
- Нажмите кнопку Добавить, чтобы добавить дополнительный веб-канал. Введите URL-адрес веб-канала NuGet версии 2, если используете веб-канал NuGet. Информацию о URL-адресе должен предоставить поставщик или администратор веб-канала NuGet. Если используется общая папка, введите полный путь к общей папке, в которой хранятся файлы пакета расширения (NUPKG-файл).
- Нажмите кнопку Добавить. Если для внесения этого изменения шлюз должен работать в режиме с повышенными привилегиями, появится запрос на повышение прав UAC. Этот запрос отображается только в том случае, если Windows Admin Center находится в режиме рабочего стола.
В списке Доступные расширения можно будет увидеть расширения из всех зарегистрированных веб-каналов. Вы можете проверить, какой веб-канал является источником расширения, используя столбец Package Feed (Веб-канал пакета).
Удаление расширения
Вы можете удалить все ранее установленные расширения или даже инструменты, которые были предварительно установлены в рамках установки Windows Admin Center.
- Нажмите кнопку Параметры вверху правой > в левой области, щелкните Расширения.
- Щелкните вкладку Установленные расширения, чтобы просмотреть все установленные расширения.
- Выберите расширение, которое нужно удалить, а затем щелкните Удалить.
После завершения удаления браузер будет автоматически обновлен, а Windows Admin Center перезагрузится, после чего расширение будет удалено. Если вы удалите инструмент, предварительно установленный, как часть Windows Admin Center, его можно будет установить повторно на вкладке Доступные расширения.
Установка расширений на компьютере без подключения к Интернету
Если Windows Admin Center установлен на компьютере без подключения к Интернету или находится за прокси-сервером, возможно, он не сможет получить доступ к расширениям и установить их из веб-канала Windows Admin Center. Вы можете загружать пакеты расширений вручную или с помощью скрипта PowerShell и настраивать Windows Admin Center на получение пакетов из общей папки или локального диска.
Загрузка пакетов расширений вручную
- Откройте веб-браузер на компьютере, подключенном к Интернету, и перейдите по следующему URL-адресу: https://dev.azure.com/WindowsAdminCenter/Windows%20Admin%20Center%20Feed/_packaging?_a=feed&feed=WAC
- Возможно, чтобы просмотреть пакеты расширений, вам потребуется создать учетную запись Майкрософт и выполнить вход.
- Щелкните имя пакета, который необходимо установить, чтобы просмотреть страницу сведений о пакете.
- Нажмите ссылку Скачать сверху на панели навигации страницы сведений о пакете и загрузите для расширения файл NUPKG.
- Повторите шаги 2 и 3 для всех пакетов, которые необходимо загрузить.
- Скопируйте файлы пакета в общую папку, доступ к которой можно получить с компьютера, на котором установлен Windows Admin Center, или на локальный диск такого компьютера.
- Следуйте инструкциям раздела Installing extensions from a different feed (Установка расширений из другого веб-канала).
Загрузка пакетов с помощью скрипта PowerShell
В Интернете есть много скриптов для загрузки пакетов NuGet из веб-канала NuGet. Мы будем использовать сценарий, предоставленный Джоном Галлоуэем (Jon Galloway), старшим руководителем программ в корпорации Майкрософт.
- Установите скрипт в качестве пакета NuGet или скопируйте и вставьте его в интегрированную среду сценариев PowerShell, как описано в записи блога.
- Измените первую строку скрипта на URL-адрес канала NuGet версии 2. Если вы скачиваете пакеты из официального канала Windows Admin Center, используйте приведенный ниже URL-адрес.
$feedUrlBase = "https://aka.ms/sme-extension-feed"
- Запустите сценарий, и он загрузит все пакеты NuGet из веб-канала в локальную папку: %USERPROFILE%\Documents\NuGetLocal
- Следуйте инструкциям раздела Installing extensions from a different feed (Установка расширений из другого веб-канала).
Управление расширениями с помощью PowerShell
В предварительной версии Windows Admin Center имеет модуль PowerShell для управления расширениями шлюза.
# Add the module to the current session Import-Module "$env:ProgramFiles\windows admin center\PowerShell\Modules\ExtensionTools" # Available cmdlets: Get-Feed, Add-Feed, Remove-Feed, Get-Extension, Install-Extension, Uninstall-Extension, Update-Extension # List feeds Get-Feed "https://wac.contoso.com" # Add a new extension feed Add-Feed -GatewayEndpoint "https://wac.contoso.com" -Feed "\\WAC\our-private-extensions" # Remove an extension feed Remove-Feed -GatewayEndpoint "https://wac.contoso.com" -Feed "\\WAC\our-private-extensions" # List all extensions Get-Extension "https://wac.contoso.com" # Install an extension (locate the latest version from all feeds and install it) Install-Extension -GatewayEndpoint "https://wac.contoso.com" "msft.sme.containers" # Install an extension (latest version from a specific feed, if the feed is not present, it will be added) Install-Extension -GatewayEndpoint "https://wac.contoso.com" "msft.sme.containers" -Feed "https://aka.ms/sme-extension-feed" # Install an extension (install a specific version) Install-Extension "https://wac.contoso.com" "msft.sme.certificate-manager" "0.133.0" # Uninstall-Extension Uninstall-Extension "https://wac.contoso.com" "msft.sme.containers" # Update-Extension Update-Extension "https://wac.contoso.com" "msft.sme.containers"
Изменять расширения Windows Admin Center с помощью PowerShell могут только администраторы шлюза.
Install and manage extensions
Windows Admin Center is built as an extensible platform where each connection type and tool is an extension that you can install, uninstall and update individually. You can search for new extensions published by Microsoft and other developers, and install and update them individually without having to update the entire Windows Admin Center installation. You can also configure a separate NuGet feed or file share and distribute extensions to use internally within your organization.
Installing an extension
Windows Admin Center will show extensions available from the specified NuGet feed. By default, Windows Admin Center points to the Microsoft official NuGet feed which hosts extensions published by Microsoft and other developers.
- Click the Settings button in the top-right > In the left pane, click Extensions.
- The Available Extensions tab will list the extensions on the feed that are available for installation.
- Click on an extension to view the extension description, version, publisher and other information in the Details pane.
- Click Install to install an extension. If the gateway must run in elevated mode to make this change, you will be presented with a UAC elevation prompt. After installation is complete, your browser will automatically be refreshed and Windows Admin Center will be reloaded with the new extension installed. If the extension you are trying to install is an update to a previously installed extension, you can click the Update to latest button to install the update. You can also go to the Installed Extensions tab to view installed extensions and see if an update is available in the Status column.
Installing extensions from a different feed
Windows Admin Center supports multiple feeds and you can view and manage packages from more than one feed at a time. Any NuGet feed that supports the NuGet V2 APIs or a file share can be added to Windows Admin Center for installing extensions from.
- Click the Settings button in the top-right > In the left pane, click Extensions.
- On the right pane, click the Feeds tab.
- Click the Add button to add another feed. For a NuGet feed, enter the NuGet V2 feed URL. The NuGet feed provider or administrator should be able to provide the URL information. For a file share, enter the full path of the file share in which the extension package files (.nupkg) are stored.
- Click Add. If the gateway must run in elevated mode to make this change, you will be presented with a UAC elevation prompt. This prompt will only be presented if you are running Windows Admin Center in desktop mode.
The Available Extensions list will show extensions from all registered feeds. You can check which feed each extension is from using the Package Feed column.
Uninstalling an extension
You can uninstall any extensions you have previously installed, or even uninstall any tools that were pre-installed as part of the Windows Admin Center installation.
- Click the Settings button in the top-right > In the left pane, click Extensions.
- Click the Installed Extensions tab to view all installed extensions.
- Choose an extension to uninstall, then click Uninstall.
After uninstall is complete, your browser will automatically be refreshed and Windows Admin Center will be reloaded with the extension removed. If you uninstalled a tool that was pre-installed as part of Windows Admin Center, the tool will be available for reinstallation in the Available Extensions tab.
Installing extensions on a computer without internet connectivity
If Windows Admin Center is installed on a computer that isn’t connected to the internet or is behind a proxy, it may not be able to access and install the extensions from the Windows Admin Center feed. You can download extension packages manually or with a PowerShell script, and configure Windows Admin Center to retrieve packages from a file share or local drive.
Manually downloading extension packages
- On another computer that has internet connectivity, open a web browser and navigate to the following URL: https://dev.azure.com/WindowsAdminCenter/Windows%20Admin%20Center%20Feed/_packaging?_a=feed&feed=WAC
- You may need to create a Microsoft account and login to view the extension packages.
- Click on the name of the package you want to install to view the package details page.
- Click on the Download link in the top navigation bar of the package details page and download the .nupkg file for the extension.
- Repeat steps 2 and 3 for all the packages you want to download.
- Copy the package files to a file share that can be accessed from the computer Windows Admin Center is installed on, or to the local disk of the computer on which Windows Admin Center is installed.
- Follow the instructions to install extensions from a different feed.
Downloading packages with a PowerShell script
There are many scripts available on the Internet for downloading NuGet packages from a NuGet feed. We’ll use the script provided by Jon Galloway, Senior Program Manager at Microsoft.
- As described in the blog post, install the script as a NuGet package, or copy and paste the script into the PowerShell ISE.
- Edit the first line of the script to your NuGet feed’s v2 URL. If you are downloading packages from the Windows Admin Center official feed, use the URL below.
$feedUrlBase = "https://aka.ms/sme-extension-feed"
- Run the script and it will download all the NuGet packages from the feed to the following local folder: %USERPROFILE%\Documents\NuGetLocal
- Follow the instructions to install extensions from a different feed.
Manage extensions with PowerShell
Windows Admin Center Preview includes a PowerShell module to manage your gateway extensions.
# Add the module to the current session Import-Module "$env:ProgramFiles\windows admin center\PowerShell\Modules\ExtensionTools" # Available cmdlets: Get-Feed, Add-Feed, Remove-Feed, Get-Extension, Install-Extension, Uninstall-Extension, Update-Extension # List feeds Get-Feed "https://wac.contoso.com" # Add a new extension feed Add-Feed -GatewayEndpoint "https://wac.contoso.com" -Feed "\\WAC\our-private-extensions" # Remove an extension feed Remove-Feed -GatewayEndpoint "https://wac.contoso.com" -Feed "\\WAC\our-private-extensions" # List all extensions Get-Extension "https://wac.contoso.com" # Install an extension (locate the latest version from all feeds and install it) Install-Extension -GatewayEndpoint "https://wac.contoso.com" "msft.sme.containers" # Install an extension (latest version from a specific feed, if the feed is not present, it will be added) Install-Extension -GatewayEndpoint "https://wac.contoso.com" "msft.sme.containers" -Feed "https://aka.ms/sme-extension-feed" # Install an extension (install a specific version) Install-Extension "https://wac.contoso.com" "msft.sme.certificate-manager" "0.133.0" # Uninstall-Extension Uninstall-Extension "https://wac.contoso.com" "msft.sme.containers" # Update-Extension Update-Extension "https://wac.contoso.com" "msft.sme.containers"
You must be gateway administrator to modify Windows Admin Center extensions with PowerShell.
Install and manage extensions
Windows Admin Center is built as an extensible platform where each connection type and tool is an extension that you can install, uninstall and update individually. You can search for new extensions published by Microsoft and other developers, and install and update them individually without having to update the entire Windows Admin Center installation. You can also configure a separate NuGet feed or file share and distribute extensions to use internally within your organization.
Installing an extension
Windows Admin Center will show extensions available from the specified NuGet feed. By default, Windows Admin Center points to the Microsoft official NuGet feed which hosts extensions published by Microsoft and other developers.
- Click the Settings button in the top-right > In the left pane, click Extensions.
- The Available Extensions tab will list the extensions on the feed that are available for installation.
- Click on an extension to view the extension description, version, publisher and other information in the Details pane.
- Click Install to install an extension. If the gateway must run in elevated mode to make this change, you will be presented with a UAC elevation prompt. After installation is complete, your browser will automatically be refreshed and Windows Admin Center will be reloaded with the new extension installed. If the extension you are trying to install is an update to a previously installed extension, you can click the Update to latest button to install the update. You can also go to the Installed Extensions tab to view installed extensions and see if an update is available in the Status column.
Installing extensions from a different feed
Windows Admin Center supports multiple feeds and you can view and manage packages from more than one feed at a time. Any NuGet feed that supports the NuGet V2 APIs or a file share can be added to Windows Admin Center for installing extensions from.
- Click the Settings button in the top-right > In the left pane, click Extensions.
- On the right pane, click the Feeds tab.
- Click the Add button to add another feed. For a NuGet feed, enter the NuGet V2 feed URL. The NuGet feed provider or administrator should be able to provide the URL information. For a file share, enter the full path of the file share in which the extension package files (.nupkg) are stored.
- Click Add. If the gateway must run in elevated mode to make this change, you will be presented with a UAC elevation prompt. This prompt will only be presented if you are running Windows Admin Center in desktop mode.
The Available Extensions list will show extensions from all registered feeds. You can check which feed each extension is from using the Package Feed column.
Uninstalling an extension
You can uninstall any extensions you have previously installed, or even uninstall any tools that were pre-installed as part of the Windows Admin Center installation.
- Click the Settings button in the top-right > In the left pane, click Extensions.
- Click the Installed Extensions tab to view all installed extensions.
- Choose an extension to uninstall, then click Uninstall.
After uninstall is complete, your browser will automatically be refreshed and Windows Admin Center will be reloaded with the extension removed. If you uninstalled a tool that was pre-installed as part of Windows Admin Center, the tool will be available for reinstallation in the Available Extensions tab.
Installing extensions on a computer without internet connectivity
If Windows Admin Center is installed on a computer that isn’t connected to the internet or is behind a proxy, it may not be able to access and install the extensions from the Windows Admin Center feed. You can download extension packages manually or with a PowerShell script, and configure Windows Admin Center to retrieve packages from a file share or local drive.
Manually downloading extension packages
- On another computer that has internet connectivity, open a web browser and navigate to the following URL: https://dev.azure.com/WindowsAdminCenter/Windows%20Admin%20Center%20Feed/_packaging?_a=feed&feed=WAC
- You may need to create a Microsoft account and login to view the extension packages.
- Click on the name of the package you want to install to view the package details page.
- Click on the Download link in the top navigation bar of the package details page and download the .nupkg file for the extension.
- Repeat steps 2 and 3 for all the packages you want to download.
- Copy the package files to a file share that can be accessed from the computer Windows Admin Center is installed on, or to the local disk of the computer on which Windows Admin Center is installed.
- Follow the instructions to install extensions from a different feed.
Downloading packages with a PowerShell script
There are many scripts available on the Internet for downloading NuGet packages from a NuGet feed. We’ll use the script provided by Jon Galloway, Senior Program Manager at Microsoft.
- As described in the blog post, install the script as a NuGet package, or copy and paste the script into the PowerShell ISE.
- Edit the first line of the script to your NuGet feed’s v2 URL. If you are downloading packages from the Windows Admin Center official feed, use the URL below.
$feedUrlBase = "https://aka.ms/sme-extension-feed"
- Run the script and it will download all the NuGet packages from the feed to the following local folder: %USERPROFILE%\Documents\NuGetLocal
- Follow the instructions to install extensions from a different feed.
Manage extensions with PowerShell
Windows Admin Center Preview includes a PowerShell module to manage your gateway extensions.
# Add the module to the current session Import-Module "$env:ProgramFiles\windows admin center\PowerShell\Modules\ExtensionTools" # Available cmdlets: Get-Feed, Add-Feed, Remove-Feed, Get-Extension, Install-Extension, Uninstall-Extension, Update-Extension # List feeds Get-Feed "https://wac.contoso.com" # Add a new extension feed Add-Feed -GatewayEndpoint "https://wac.contoso.com" -Feed "\\WAC\our-private-extensions" # Remove an extension feed Remove-Feed -GatewayEndpoint "https://wac.contoso.com" -Feed "\\WAC\our-private-extensions" # List all extensions Get-Extension "https://wac.contoso.com" # Install an extension (locate the latest version from all feeds and install it) Install-Extension -GatewayEndpoint "https://wac.contoso.com" "msft.sme.containers" # Install an extension (latest version from a specific feed, if the feed is not present, it will be added) Install-Extension -GatewayEndpoint "https://wac.contoso.com" "msft.sme.containers" -Feed "https://aka.ms/sme-extension-feed" # Install an extension (install a specific version) Install-Extension "https://wac.contoso.com" "msft.sme.certificate-manager" "0.133.0" # Uninstall-Extension Uninstall-Extension "https://wac.contoso.com" "msft.sme.containers" # Update-Extension Update-Extension "https://wac.contoso.com" "msft.sme.containers"
You must be gateway administrator to modify Windows Admin Center extensions with PowerShell.
При подготовке материала использовались источники:
https://learn.microsoft.com/ru-ru/windows-server/manage/windows-admin-center/configure/using-extensions
https://learn.microsoft.com/en-us/windows-server/manage/windows-admin-center/configure/using-extensions
https://learn.microsoft.com/en-my/windows-server/manage/windows-admin-center/configure/using-extensions