Notitie
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen u aan te melden of de directory te wijzigen.
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen de mappen te wijzigen.
A tool extension is the primary way that users interact with Windows Admin Center to manage a connection, such as a server or cluster. When you click on a connection in the Windows Admin Center home screen and connect, you will then be presented with a list of tools in the left navigation pane. When you click on a tool, the tool extension is loaded and displayed in the right pane.
When a tool extension is loaded, it can execute WMI calls or PowerShell scripts on a target server or cluster and display information in the UI or execute commands based on user input. Tool extensions define which solutions it should be displayed for, resulting in a different set of tools for each solution.
Opmerking
Not familiar with the different extension types? Meer informatie over de uitbreidbaarheidsarchitectuur en extensietypen.
Uw omgeving voorbereiden
Als u dat nog niet hebt gedaan, bereid uw omgeving voor door afhankelijkheden en algemene vereisten te installeren die vereist zijn voor alle projecten.
Create a new tool extension with the Windows Admin Center SDK
Once you have all the dependencies installed, you are ready to create your new tool extension. Create or browse to a folder that contains your project files, open a command prompt, and set that folder as the working directory. Using the Windows Admin Center SDK that was installed previously, create a new extension with the following syntax:
wac create --company "{!Company Name}" --tool "{!Tool Name}" --version latest
Waarde | Uitleg | Voorbeeld |
---|---|---|
{!Company Name} |
De bedrijfsnaam (met spaties) | Contoso Inc |
{!Tool Name} |
De naam van het hulpprogramma (met spaties) | Manage Foo Works |
Hier volgt een voorbeeld van het gebruik:
wac create --company "Contoso Inc" --tool "Manage Foo Works" --version latest
This creates a new folder inside the current working directory using the name you specified for your tool, copies all the necessary template files into your project, and configures the files with your company and tool name.
Opmerking
The --version flag in this command specifies which version of the Windows Admin Center SDK you'd like to target. Read about how to target a different version of the Windows Admin Center SDK to keep up your extension up to date with the latest SDK and platform changes.
Next, change directory into the folder just created, then install required local dependencies by running the following command:
npm install
Once this completes, you've set up everything you need to load your new extension into Windows Admin Center.
Add content to your extension
Now that you've created an extension with the Windows Admin Center SDK, you are ready to customize content. See these guides for examples of what you can do:
- Een lege module toevoegen
- Add an iFrame
Even more examples can be found in our Developer Guide. The Developer Guide is a fully functioning solution extension that can be side-loaded into Windows Admin Center, and contains a rich collection of sample functionality and tool examples that you can browse and use in your own extension.
Enable the Developer Guide extension on the Advanced page of your Windows Admin Center settings.
Customize your extension's icon
You can customize the icon that shows for your extension in the tool list. To do this, modify all icon
entries in manifest.json
for your extension:
"icon": "{!icon-uri}",
Waarde | Uitleg | Example uri |
---|---|---|
{!icon-uri} |
The location of your icon resource | assets/foo-icon.svg |
NOTE: Currently, custom icons aren't visible when side loading your extension in dev mode. As a workaround, remove the contents of target
as follows:
"target": "",
This configuration is only valid for side loading in dev mode, so it's important to preserve the value contained in target
and then restore it before publishing your extension.
Build and side load your extension
Vervolgens kunt u uw extensie in het Windows-beheercentrum bouwen en sideloaden. Open een opdrachtvenster, wijzig de map in uw bronmap en vervolgens bent u klaar om te bouwen.
Build and serve with gulp:
gulp build gulp serve --port 4201
Note that you need to choose a port that is currently free. Make sure you do not attempt to use the port that Windows Admin Center is running on.
Uw project kan worden geladen in een lokaal exemplaar van het Windows-beheercentrum om te testen door het lokaal uitgevoerde project te koppelen aan het Windows-beheercentrum.
Windows Admin Center starten in een webbrowser
Open het foutopsporingsprogramma (F12)
Open de console en typ de volgende opdracht:
MsftSme.sideLoad("http://localhost:4201")
De webbrowser vernieuwen
Your project will now be visible in the Tools list with (side loaded) next to the name.