Microservices
Through Microservices
, scripts can be created, packaged, and published so that the technical teams of the organization can easily execute them. This also allows initial support levels to delegate their execution, so that user requests can be efficiently handled and the most frequent problems solved.
The created microservices can be executed on the devices themselves, with local administrator permissions or with user session permissions.
They can also be scheduled to run at the most opportune time. They even support event or alert triggers, which can be used as a self-remediation mechanism when a problem is detected.
Microservices management
Microservices have several configuration options that modify their behavior; for instance, it can change depending on whether the script runs from the user session or from the local administrator.
Activation in Portal
To activate a microservice and have it available for execution in Workspaces, go to Marketplace
in Microservices
of Portal
. From there, after exploring and finding the microservice of interest, it can be enabled with the button located in the top right corner of the interface.
After a few seconds, the microservice will be visible in Workspaces and can be executed on the devices.
Microservice creation
To create a new microservice, go to the Designer
section and click on New
. The wizard will open, asking to enter the following information:
- Microservice name
- Icon color
- Microservice icon
- Brief description of what the microservice does
- The language it is developed in
- Version number
- Scope of execution, you can select at system level (administrative access) or session level (with user identity)
- Operating system it is designed for
- Category: directory or group of microservices accessible from Workspaces where this microservice will be hosted
- Time efficiency achieved with each execution
The microservice name should not contain special characters (such as \ / : * ? " < > and other specific language characters for certain keyboard layouts) if the microservice will be used as an end-user microservice.
States of the microservices
Microservices have three states:
- Enabled
- Disabled
- Archived
Considerations about the code to use
Although microservices allow the execution of any CMD or PowerShell command on Windows devices, the sent commands will be executed from the local administrator or the user session, depending on the assigned scope. This can mean that some cmdlets do not have the expected output in relation to the execution performed; therefore, if a script is being made in PowerShell, a series of considerations should be taken into account:
-
It is recommended that the installed version of PowerShell on the devices is the same as the one used to develop the microservices.
-
The microservices can be executed under the user session identity or from the local administrator.
-
Execution from the local administrator: in
Scope
you can configureApplies to Workspaces
orApplies to servers
, which makes it much easier to interact with processes, services, and act with administrative permissions on the device, but it can complicate accessing specific user or session information. -
Execution from user session: in
Scope
you can configureApplies to user sessions
, which is very useful for accessing user information such as the registry, information contained in the profile, etc. It should be noted that the script will be executed with the permission level that the user has, so if the user is not a local administrator, there will be certain limitations when acting at the system level.
-
-
When we want to display a message in the microservice output, it is recommended to use the cmdlet "Write-Output" instead of "Write-Host".
-
The output of the execution can be consulted in the details of the
Job
generated in the execution.
Ways to consume microservices
Microservices can be created and enabled in Portal, and from there be configured to be executed by the end-user, launched through a Flow
or to be executed with automated or support actions from Workspaces.
End-user execution
In Portal
-> Enabled
by clicking on a microservice you access its characteristics. In the Recipients
tab -> Execution from Workspaces
the execution permissions of the microservice in Workspaces are shown. Next, in Execution by the end user
you can see if the microservice has the option enabled to be executed by the end user, if so, it shows the name of the user and the number of devices where it is available.
If the option Execution by the end user
is activated, the microservice will add a button on the user's device home screen, so that it can be executed in a quicker and more direct way.
The microservice name should not contain special characters (such as \ / : * ? " < > and other specific language characters for certain keyboard layouts) if the microservice will be used as an end-user microservice.
A configuration change to an existing end-user microservice can take up to 15 minutes to apply to all linked devices.
Execution through a flow
Flows
is a feature that can be configured in Portal. It allows creating automation flows and executing a microservice automatically when certain conditions are met on the device.
Its main feature is that, through the execution of a microservice, it simplifies proactive diagnostic actions and quickly solves problems when there is a focus on their detection. In the Flows section, you can get more information about its features and configuration.
Execution from Workspaces
From the Workspaces module, any microservice that has been previously enabled in Portal can be executed. To do this, the user must go to the Workspaces
or Sessions
tab and select the device(s) they want to apply the microservice to.
Microservices will be available from the Workspaces
tab when they have been previously configured to run at the system level. And from Sessions
when in their configuration the option to run at session level has been selected.
The ability to execute certain microservices will depend on the role or permissions the user has on the platform.