<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Inventory Archives | XOAP</title>
	<atom:link href="https://dev.xoap.io/fr/docs-category/inventory/feed/" rel="self" type="application/rss+xml" />
	<link>https://dev.xoap.io/fr/docs-category/inventory/</link>
	<description>Plate-forme pour l'infrastructure informatique et l'automatisation du lieu de travail</description>
	<lastbuilddate>Tue, 27 Jan 2026 13:22:48 +0000</lastbuilddate>
	<language>fr-FR</language>
	<sy:updateperiod>
	horaire	</sy:updateperiod>
	<sy:updatefrequency>
	1	</sy:updatefrequency>
	

<image>
	<url>https://dev.xoap.io/wp-content/uploads/2023/11/cropped-favicon-32x32.png</url>
	<title>Inventory Archives | XOAP</title>
	<link>https://dev.xoap.io/fr/docs-category/inventory/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Devices</title>
		<link>https://dev.xoap.io/fr/docs/devices/</link>
					<comments>https://dev.xoap.io/fr/docs/devices/#respond</comments>
		
		<dc:creator><![CDATA[Stella]]></dc:creator>
		<pubdate>Thu, 25 Sep 2025 11:13:33 +0000</pubdate>
				<guid ispermalink="false">https://dev.xoap.io/?post_type=docs&#038;p=25714</guid>

					<description><![CDATA[<p>Quick guide XOAP Devices are endpoints where the XOAP Connector is installed and enrolled into your workspace. Once connected, devices become visible in the Inventory module and can be used to run queries and commands, collect inventory data, and (if enabled during installation) participate in Image Management workflows. Add a Device (Install XOAP Connector) Delete [&#8230;]</p>
<p>The post <a href="https://dev.xoap.io/fr/docs/devices/">Devices</a> appeared first on <a href="https://dev.xoap.io/fr">XOAP</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-1 wp-block-group-is-layout-flex">
<h2 class="wp-block-heading" style="font-size:38px">Quick guide</h2>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>XOAP <strong>Dispositifs</strong> are endpoints where the <strong>XOAP Connector</strong> is installed and enrolled into your workspace. Once connected, devices become visible in the Inventory module and can be used to run queries and commands, collect inventory data, and (if enabled during installation) participate in Image Management workflows.</p>
</blockquote>



<h3 class="wp-block-heading" style="font-size:28px">Add a Device (Install XOAP Connector)</h3>



<ol class="wp-block-list">
<li>Aller à <strong>Inventory → Devices</strong> et cliquez sur <strong>+ Add Device</strong>.</li>



<li>Dans le cadre de la <strong>Download the XOAP connector</strong> section, select the target platform (Windows / macOS / Linux) and click <strong>Télécharger</strong>.</li>



<li>En <strong>Enroll and start the XOAP connector</strong>, select the <strong>API key</strong> that should be used for enrollment.</li>



<li>Copy the generated installation command and run it on the target device:
<ul class="wp-block-list">
<li><strong>Windows:</strong> Exécuter <strong>Windows PowerShell as Administrator</strong></li>



<li><strong>Linux/macOS:</strong> Run the command with appropriate privileges (for example, using sudo where required)</li>
</ul>
</li>



<li>After installation completes, the Connector service is automatically started.</li>



<li>Once the device connects, it will appear in <strong>Inventory → Devices</strong> with an online status.</li>
</ol>



<h3 class="wp-block-heading" style="font-size:28px">Delete a Device</h3>



<ol class="wp-block-list">
<li>En <strong>Inventory → Devices</strong>, click the <strong>Action menu (</strong><strong>⋮</strong><strong>)</strong> next to the device.</li>



<li>Sélectionner <strong>Supprimer</strong>.</li>



<li>Confirm the deletion.</li>
</ol>



<h3 class="wp-block-heading" style="font-size:28px">Additional useful information</h3>



<h4 class="wp-block-heading" style="font-size:21px">API key prerequisite</h4>



<p>To enroll a device, you must first create an <strong>API key</strong> in XOAP (under <strong>Connexions</strong>). The installer uses this key to register the device to your workspace.</p>



<h4 class="wp-block-heading" style="font-size:21px">Service behavior</h4>



<p>The XOAP Connector runs as a <strong>service (Windows) /daemon (Linux/Mac)</strong>.</p>



<h4 class="wp-block-heading" style="font-size:21px">Image Management flag</h4>



<p>If the device will be used for <strong>Image Management</strong>, install the connector using the <strong>&#8211;imagemanagement</strong> flag to enable the required functionality during enrollment.</p>



<h4 class="wp-block-heading" style="font-size:21px">Connectivity requirements</h4>



<p>The device must be able to reach the XOAP backend (HTTPS/443, directly or via proxy) to enroll and stay connected.</p>



<h4 class="wp-block-heading" style="font-size:21px">Devices vs. Nodes</h4>



<p>A single endpoint can appear <strong>both</strong> as a <strong>Device</strong> in <em>Inventaire</em> (XOAP Connector installed) and as a <strong>Node</strong> in <em>Configuration Management</em> (registered via configuration). These are complementary views—one does not exclude the other.</p>



<h4 class="wp-block-heading" style="font-size:21px">Mass deployment option (PSADT + Application Management)</h4>



<p>Le <strong>XOAP Connector</strong> installer can be packaged as a <strong>PSAppDeployToolkit (PSADT)</strong> package and deployed via <strong>Application Management</strong> to:</p>



<ul class="wp-block-list">
<li>already managed <strong>Nœuds</strong>, and</li>



<li>new endpoints as part of onboarding.</li>
</ul>



<h2 class="wp-block-heading" style="font-size:38px">Technical documentation</h2>



<p>Le <strong>Dispositifs</strong> page in <strong>Inventaire</strong> lists endpoints where the <strong>XOAP Connector</strong> is installed and enrolled into a workspace. Once connected, devices can execute Inventory features (for example <strong>Queries</strong> via <strong>osquery</strong>) and support operational actions such as running commands/scripts, transferring files, and installing applications.</p>



<p>A device can be managed in multiple XOAP areas at the same time:</p>



<ul class="wp-block-list">
<li>The same endpoint can appear as a <strong>Node</strong> in <strong>Configuration Management</strong> and as a <strong>Device</strong> in <strong>Inventaire</strong>. These are different feature areas and <strong>do not exclude each other</strong>.</li>
</ul>



<h3 class="wp-block-heading" style="font-size:28px">Conditions préalables</h3>



<ul class="wp-block-list">
<li><strong>API key</strong> must exist in <strong>XOAP Connections</strong> before installing/enrolling the XOAP Connector.</li>



<li>Local admin/root privileges are required to install the connector and set up the service.</li>
</ul>



<h3 class="wp-block-heading" style="font-size:28px">Installing and enrolling the XOAP Connector</h3>



<p>En <strong>Inventory → Devices → Add Agent</strong>, select the platform and API key. XOAP generates an install command that enrolls the device into the correct workspace.</p>



<h4 class="wp-block-heading" style="font-size:21px">Windows (PowerShell as Administrator):</h4>



<p>.\XOAP.Connector.Installer.exe &#8211;install &#8211;apiKey APIKEY &#8211;workspace WORKSPACEID</p>



<h4 class="wp-block-heading" style="font-size:21px">Linux (run with sudo):</h4>



<p>./XOAP.Connector.Installer &#8211;install &#8211;apiKey APIKEY&nbsp; &#8211;workspace WORKSPACEID</p>



<h3 class="wp-block-heading" style="font-size:28px">Image Management flag</h3>



<p>If the device should be used for Image Management, install the connector with the Image Management flag:</p>



<p>.\XOAP.Connector.Installer.exe &#8211;install &#8211;apiKey APIKEY &#8211;workspace WORKSPACEID &#8211;ImageManagement</p>



<p>If Image Management is not enabled during installation, the device will still work for Inventory features, but Image Management-specific capabilities may not be available.</p>



<h3 class="wp-block-heading" style="font-size:28px">Service startup</h3>



<p>After installation, the XOAP Connector service is started automatically. If needed, it can be started manually:</p>



<p>Start-Service XOAPConnector</p>



<h3 class="wp-block-heading" style="font-size:28px">What gets installed during XOAP Connector installation</h3>



<p>During installation, the XOAP Connector installation utility <strong>detects existing components first</strong> and installs only what is missing or required. If a component is already installed and meets the expected version, that step is skipped.</p>



<h4 class="wp-block-heading" style="font-size:21px">Components handled by the installer</h4>



<h5 class="wp-block-heading" style="font-size:18px">1) XOAP Connector binaries</h5>



<ul class="wp-block-list">
<li>Downloads the latest XOAP Connector release package and extracts it to:
<ul class="wp-block-list">
<li>C:\Program Files\XOAP\Connector</li>
</ul>
</li>



<li>Creates/updates the connector configuration as part of enrollment (API key + workspace).</li>
</ul>



<h5 class="wp-block-heading" style="font-size:18px">2) XOAP Connector Windows Service</h5>



<ul class="wp-block-list">
<li>Installs a Windows service named <strong>XOAPConnector</strong></li>



<li>Starts the service after installation (and typically configures it for automatic startup).</li>
</ul>



<h5 class="wp-block-heading" style="font-size:18px">3) Installer persistence files</h5>



<ul class="wp-block-list">
<li>Persists installer/support files under:
<ul class="wp-block-list">
<li>C:\Program Files\XOAP\Installer</li>
</ul>
</li>
</ul>



<h5 class="wp-block-heading" style="font-size:18px">4) osquery (Inventory / Queries dependency)</h5>



<ul class="wp-block-list">
<li>Detects osquery installation and version.</li>



<li>If missing (or older than required), downloads and installs osquery (MSI).</li>



<li>If already installed and the version is equal/newer than required, installation is skipped.</li>
</ul>



<h5 class="wp-block-heading" style="font-size:18px">5) Supporting tooling (prepared installers / prerequisites)</h5>



<p>The installer can prepare prerequisites used by XOAP workflows (depending on scenario/feature usage):</p>



<ul class="wp-block-list">
<li><strong>Packer</strong> (commonly required for Image Management-related workflows)</li>



<li><strong>Azure CLI</strong> (used when interacting with Azure workflows)</li>



<li><strong>WinGet initialization</strong> may be executed to support prerequisite handling on Windows.</li>
</ul>



<h3 class="wp-block-heading" style="font-size:28px">Temporary download locations</h3>



<p>Downloaded packages (for example connector ZIP and osquery MSI) are typically staged under:</p>



<ul class="wp-block-list">
<li>C:\Users\&lt;user&gt;\AppData\Local\Temp\&#8230;</li>
</ul>



<h3 class="wp-block-heading" style="font-size:28px">Updating and uninstalling (optional operational commands)</h3>



<p>Depending on your distribution/installer build, the connector utility may support lifecycle operations such as:</p>



<h4 class="wp-block-heading" style="font-size:21px">Update</h4>



<p>\XOAP.Connector-Installer.exe &#8211;update</p>



<h4 class="wp-block-heading" style="font-size:21px">Uninstall</h4>



<p>.\XOAP.Connector-Installer.exe &#8211;uninstall</p>



<h3 class="wp-block-heading" style="font-size:28px">Device actions in Inventory</h3>



<p>From the <strong>device action menu</strong> (⋮) you can run operations on a connected device, such as:</p>



<ul class="wp-block-list">
<li><strong>View agent log</strong>: Opens connector runtime logs for troubleshooting.</li>



<li><strong>Run Command</strong>: Executes a command from the Commands Library on the device.</li>



<li><strong>Run Query</strong>: Executes an osquery-based Inventory query on the device.</li>



<li><strong>Run Script</strong>: Runs a script on the device.
<ul class="wp-block-list">
<li>Scripts are selected from the <strong>XOAP Resources</strong> area (scripts must exist as resources first).</li>
</ul>
</li>



<li><strong>Install applications</strong>: Assigns and triggers application installs (depending on your Application Management setup).</li>



<li><strong>Transfer file</strong>:
<ul class="wp-block-list">
<li><strong>Télécharger</strong>: Retrieve a file from the device to XOAP (optionally add it to Resources).</li>



<li><strong>Upload</strong>: Upload a file to the device either from XOAP Resources or from your local machine.</li>
</ul>
</li>



<li><strong>Supprimer</strong>: Removes the device from the Inventory list (device-side uninstall is a separate action/process).</li>
</ul>



<h3 class="wp-block-heading" style="font-size:28px">More information</h3>



<h4 class="wp-block-heading" style="font-size:21px">Devices vs Nodes</h4>



<p>A device can be managed as a <strong>Device</strong> (Inventory) and a <strong>Node</strong> (Configuration Management) at the same time.</p>



<h4 class="wp-block-heading" style="font-size:21px">Mass deployment</h4>



<p>The XOAP Connector can be packaged (for example as a <strong>PSAppDeployToolkit (PSADT)</strong> package) and deployed at scale through <strong>Application Management</strong> to existing managed Nodes — and used as a standardized installer for new devices as well.</p>



<h4 class="wp-block-heading" style="font-size:21px">Image Management enablement</h4>



<p>If a device is intended to participate in <strong>Image Management</strong>, install with &#8211;imagemanagement from the start to ensure the correct capabilities are enabled.</p>
</div><p>The post <a href="https://dev.xoap.io/fr/docs/devices/">Devices</a> appeared first on <a href="https://dev.xoap.io/fr">XOAP</a>.</p>
]]></content:encoded>
					
					<wfw:commentrss>https://dev.xoap.io/fr/docs/devices/feed/</wfw:commentrss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Queries</title>
		<link>https://dev.xoap.io/fr/docs/queries/</link>
					<comments>https://dev.xoap.io/fr/docs/queries/#respond</comments>
		
		<dc:creator><![CDATA[Stella]]></dc:creator>
		<pubdate>Thu, 25 Sep 2025 13:34:51 +0000</pubdate>
				<guid ispermalink="false">https://dev.xoap.io/?post_type=docs&#038;p=25731</guid>

					<description><![CDATA[<p>Quick guide XOAP Queries are SQL-based queries that run directly on managed devices to collect inventory and operational data. When the XOAP Connector is installed, it also deploys osquery, and XOAP Queries use this osquery engine to execute SQL statements on the endpoint and return the results to XOAP. Create a new Query Edit a [&#8230;]</p>
<p>The post <a href="https://dev.xoap.io/fr/docs/queries/">Queries</a> appeared first on <a href="https://dev.xoap.io/fr">XOAP</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-2 wp-block-group-is-layout-flex">
<h2 class="wp-block-heading" style="font-size:38px">Quick guide</h2>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>XOAP <strong>Queries</strong> are SQL-based queries that run directly on managed devices to collect inventory and operational data. When the <strong>XOAP Connector</strong> is installed, it also deploys <strong>osquery</strong>, and XOAP Queries use this osquery engine to execute SQL statements on the endpoint and return the results to XOAP.</p>
</blockquote>



<h3 class="wp-block-heading" style="font-size:28px">Create a new Query</h3>



<ol class="wp-block-list">
<li>En <strong>Inventory → Queries</strong>, click <strong>+ Add Query</strong>.</li>



<li>Enter a <strong>Query name</strong>.</li>



<li>Select the target <strong>OS</strong>.</li>



<li>(Optional) Add <strong>Tags</strong> and a <strong>Description</strong>.</li>



<li>En <strong>Command</strong>, paste the SQL query to be executed on the device.</li>



<li>Cliquez sur <strong>Add</strong> to create the query.</li>
</ol>



<h3 class="wp-block-heading" style="font-size:28px">Edit a Query</h3>



<ol class="wp-block-list">
<li>Open the query details (for example, via the <strong>Details</strong> option/icon).</li>



<li>Cliquez sur <strong>Editer</strong>.</li>



<li>Update the query metadata (name, OS, tags, description) and/or the <strong>Command</strong>.</li>



<li>Save your changes.</li>
</ol>



<h3 class="wp-block-heading" style="font-size:28px">Delete a Query</h3>



<ol class="wp-block-list">
<li>In the Queries list, select the query (or multiple queries).</li>



<li>Delete it using the <strong>Supprimer</strong> option/icon.</li>



<li>Confirm the deletion.</li>
</ol>



<h3 class="wp-block-heading" style="font-size:28px">Additional useful information</h3>



<h4 class="wp-block-heading" style="font-size:21px">OS compatibility</h4>



<p>Not all queries work on every operating system. As a best practice, indicate OS scope in the query name (e.g., WIN_, LINUX_, MAC_, or ALL_) so it’s clear whether a query is OS-specific or universal.</p>



<h4 class="wp-block-heading" style="font-size:21px">Keep queries efficient</h4>



<p>Prefer targeted filters and limit result size where possible. Heavy queries (large tables, many joins, or broad scans) can increase endpoint load and slow down data collection.</p>



<h2 class="wp-block-heading" style="font-size:38px">Technical documentation</h2>



<p><strong>Queries</strong> in XOAP are <strong>SQL statements executed on endpoints</strong> to retrieve inventory and security-relevant information (software, users, processes, services, browser extensions, local groups, etc.). XOAP uses these queries to collect structured data from devices and present it centrally in the Inventory module.</p>



<p><strong>osquery</strong> is an open-source endpoint agent that exposes operating system data through a <strong>SQL interface</strong>. Internally, it maps OS information to virtual “tables” (for example processes, users, services, programs, chrome_extensions) that you can query using standard SQL syntax. The result is a consistent, queryable inventory layer across supported platforms.</p>



<p>When the <strong>XOAP Connector</strong> is installed on a device, <strong>osquery is deployed as part of the installation</strong>. XOAP then triggers the configured SQL query on the endpoint via the Connector and collects the results back into XOAP for reporting and analysis.</p>



<p>High-level flow:</p>



<ol class="wp-block-list">
<li>You define a Query (SQL + target OS metadata) in XOAP.</li>



<li>XOAP triggers execution on selected endpoints through the XOAP Connector.</li>



<li>osquery runs the SQL locally and returns rows (results).</li>



<li>XOAP ingests and displays the returned data in Inventory.</li>
</ol>



<p>Here are a few simple osquery SQL examples you can use as templates:</p>



<h3 class="wp-block-heading" style="font-size:28px">Basic system info</h3>



<p>SELECT hostname, cpu_type, cpu_subtype, physical_memory</p>



<p>FROM system_info;</p>



<h3 class="wp-block-heading" style="font-size:28px">List local users</h3>



<p>SELECT username, uid, description</p>



<p>FROM users</p>



<p>ORDER BY username;</p>



<h3 class="wp-block-heading" style="font-size:28px">Installed software (Windows-focused)</h3>



<p>SELECT name, version, install_location, publisher</p>



<p>FROM programs</p>



<p>ORDER BY name;</p>



<p>The schema of the osquery tables can be found on <a href="https://osquery.io/schema/5.21.0/">https://osquery.io/schema/5.21.0/</a></p>
</div><p>The post <a href="https://dev.xoap.io/fr/docs/queries/">Queries</a> appeared first on <a href="https://dev.xoap.io/fr">XOAP</a>.</p>
]]></content:encoded>
					
					<wfw:commentrss>https://dev.xoap.io/fr/docs/queries/feed/</wfw:commentrss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Commands library</title>
		<link>https://dev.xoap.io/fr/docs/commands-library/</link>
					<comments>https://dev.xoap.io/fr/docs/commands-library/#respond</comments>
		
		<dc:creator><![CDATA[Stella]]></dc:creator>
		<pubdate>Tue, 27 Jan 2026 12:34:17 +0000</pubdate>
				<guid ispermalink="false">https://dev.xoap.io/?post_type=docs&#038;p=29226</guid>

					<description><![CDATA[<p>Quick guide Commands Library is a centralized repository for reusable commands that can be executed on managed devices. It lets you standardize common operational tasks (e.g., troubleshooting, data collection, quick checks) by storing commands in one place and reusing them across the environment. Commands can be created for different runtimes such as PowerShell, PowerShell Core, [&#8230;]</p>
<p>The post <a href="https://dev.xoap.io/fr/docs/commands-library/">Commands library</a> appeared first on <a href="https://dev.xoap.io/fr">XOAP</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-3 wp-block-group-is-layout-flex">
<h2 class="wp-block-heading" style="font-size:38px">Quick guide</h2>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Commands Library</strong> is a centralized repository for reusable commands that can be executed on managed devices. It lets you standardize common operational tasks (e.g., troubleshooting, data collection, quick checks) by storing commands in one place and reusing them across the environment. Commands can be created for different runtimes such as <strong>PowerShell</strong>, <strong>PowerShell Core</strong>, <strong>Bash/Shell</strong>, or <strong>CMD</strong>.</p>
</blockquote>



<h3 class="wp-block-heading" style="font-size:28px">Add a new Command</h3>



<ol class="wp-block-list">
<li>Cliquez sur <strong>+ Add Command</strong>.</li>



<li>Enter a <strong>Command name</strong>.</li>



<li>Select the <strong>Type</strong> (e.g., PowerShell Core, PowerShell, Bash/Shell, CMD).</li>



<li>(Optional) Add <strong>Tags</strong> and a <strong>Description</strong>.</li>



<li>Paste or write the <strong>Command</strong> content.</li>



<li>Cliquez sur <strong>Add</strong> to create the command.</li>
</ol>



<h3 class="wp-block-heading" style="font-size:28px">Edit a Command</h3>



<ol class="wp-block-list">
<li>Open the command (e.g., via the <strong>Details</strong> / eye icon).</li>



<li>Dans le cadre de la <strong>Current version</strong> panel, click <strong>Editer</strong>.</li>



<li>Update the command content and/or metadata as needed.</li>



<li>Save the changes (a new version is created).</li>
</ol>



<h3 class="wp-block-heading" style="font-size:28px">Delete a Command</h3>



<ol class="wp-block-list">
<li>Click the <strong>Supprimer</strong> (trash) icon next to the command.</li>



<li>Confirm deletion.</li>
</ol>



<h3 class="wp-block-heading" style="font-size:28px">Additional useful information</h3>



<h4 class="wp-block-heading" style="font-size:21px">OS compatibility</h4>



<p>Some command types are OS-specific. Use <strong>Tags</strong> (e.g., windows, linux) and/or naming conventions to clearly indicate the target platform.</p>



<h4 class="wp-block-heading" style="font-size:21px">Prefer non-interactive commands</h4>



<p>Avoid prompts and UI interactions; commands should run unattended.</p>



<h4 class="wp-block-heading">Keep output readable</h4>



<p>Return clear, structured output (and include error handling) to simplify troubleshooting and auditing.</p>



<h2 class="wp-block-heading" style="font-size:38px">Technical documentation</h2>



<p>Le <strong>Commands Library</strong> is XOAP’s centralized store for <strong>versioned and reusable commands </strong>that can be executed on managed devices through the XOAP Inventory/Connector execution layer. It is designed for operational tasks such as troubleshooting, validation checks, log collection, and lightweight remediation actions.</p>



<p>A command in the library is defined by:</p>



<ul class="wp-block-list">
<li><strong>Metadata</strong> (name, description, tags)</li>



<li><strong>Runtime type</strong> (PowerShell, PowerShell Core, Bash/Shell, CMD)</li>



<li><strong>Command body</strong> (the actual script/command text)</li>



<li><strong>Version information</strong> (version number and message)</li>
</ul>



<p>Commands are executed on devices that have the <strong>XOAP Connector</strong> installed.</p>



<h3 class="wp-block-heading" style="font-size:28px">Command Types (Runtime)</h3>



<p>When you create a command, you select a <strong>Type</strong> that defines the interpreter/runtime used on the device:</p>



<ul class="wp-block-list">
<li><strong>PowerShell<br></strong>Runs using Windows PowerShell (typically 5.1 on Windows).</li>



<li><strong>PowerShell Core<br></strong>Runs using PowerShell 7+ (cross-platform when available).</li>



<li><strong>Bash/Shell<br></strong>Runs using a shell on Linux/macOS (typically /bin/bash or /bin/sh, depending on the device).</li>



<li><strong>CMD<br></strong>Runs using Windows Command Prompt (cmd.exe).</li>
</ul>



<h3 class="wp-block-heading" style="font-size:28px">Versioning behavior</h3>



<p>Commands are <strong>versioned artifacts</strong>. Any change to the command definition (especially the command body) should be treated as a new version so you can:</p>



<ul class="wp-block-list">
<li>Track who changed what and why</li>



<li>Roll forward safely</li>



<li>Keep operational actions reproducible across environments</li>
</ul>



<p><strong>Best practice:</strong> Use short, meaningful version messages (e.g., “Add service filter”, “Fix path quoting”, “Support PS7”).</p>



<h3 class="wp-block-heading" style="font-size:28px">Fields and what they mean</h3>



<p>Dans le cadre de la <strong>Add Command</strong> dialog:</p>



<ul class="wp-block-list">
<li><strong>Command name<br></strong>Unique, human-readable identifier. Use a consistent naming scheme like:<br>windows-check-service-status / linux-journalctl-last-50</li>



<li><strong>Type<br></strong>The runtime/interpreter used to execute the command on the target device.</li>



<li><strong>Tags<br></strong>Used for filtering and organization (OS, purpose, team, environment).</li>



<li><strong>Description (optional)<br></strong>Short explanation of intent, expected output, and any prerequisites.</li>



<li><strong>Command<br></strong>The script/command content. This should be non-interactive and safe to run repeatedly.</li>
</ul>



<h3 class="wp-block-heading" style="font-size:28px">Execution model and output</h3>



<p>Commands are&nbsp; executed remotely and return:</p>



<ul class="wp-block-list">
<li><strong>Exit code</strong> (success/failure)</li>



<li><strong>Standard output</strong> (results)</li>



<li><strong>Standard error</strong> (errors)</li>
</ul>



<h3 class="wp-block-heading" style="font-size:28px">Recommended patterns</h3>



<ul class="wp-block-list">
<li>Return <strong>human-readable output</strong> plus simple structured output where possible (key/value lines).</li>



<li>Use explicit exit codes:
<ul class="wp-block-list">
<li>0 = success</li>



<li>non-zero = failure or partial failure</li>
</ul>
</li>



<li>Write errors to stderr and keep stdout for normal results.</li>
</ul>



<h3 class="wp-block-heading" style="font-size:28px">Operational and security considerations</h3>



<h4 class="wp-block-heading" style="font-size:21px">Non-interactive only</h4>



<ul class="wp-block-list">
<li>Avoid prompts (Read-Host, pause, interactive confirmation).</li>



<li>Assume the command runs unattended.</li>
</ul>



<h4 class="wp-block-heading" style="font-size:21px">Idempotency</h4>



<ul class="wp-block-list">
<li>Prefer commands that can be run multiple times without harmful side effects.</li>



<li>For remediation-type commands, check current state before changing it.</li>
</ul>



<h4 class="wp-block-heading" style="font-size:21px">Logging</h4>



<ul class="wp-block-list">
<li>For troubleshooting commands, include contextual details (hostname, timestamp, relevant versions).</li>
</ul>



<h3 class="wp-block-heading" style="font-size:28px">Best practices for building a maintainable library</h3>



<ul class="wp-block-list">
<li><strong>Naming convention: </strong>os-purpose-action (e.g., windows-inventory-installed-software)</li>



<li><strong>Tagging:</strong> OS + team + category (e.g., windows, security, troubleshooting)</li>



<li><strong>Small scope:</strong> One command = one purpose. Avoid “do everything” scripts.</li>



<li><strong>Document prerequisites:</strong> Required tools, modules, permissions, or paths.</li>



<li><strong>Test on pilots:</strong> Validate on a small set of devices before broad use.</li>



<li><strong>Prefer PowerShell Core for cross-platform:</strong> If your fleet supports it, it simplifies reuse.</li>
</ul>



<h3 class="wp-block-heading" style="font-size:28px">Examples (simple, safe commands)</h3>



<h4 class="wp-block-heading" style="font-size:21px">PowerShell (Windows) – list a service state</h4>



<p>Get-Service -Name &#8220;WinRM&#8221; | Select-Object Name, Status, StartType</p>



<h4 class="wp-block-heading" style="font-size:21px">PowerShell (Windows) – last 50 event log errors (System)</h4>



<p>Get-WinEvent -LogName System -MaxEvents 50 |<br>&nbsp; Where-Object { $_.LevelDisplayName -in &#8220;Error&#8221;,&#8221;Critical&#8221; } |<br>&nbsp; Select-Object TimeCreated, Id, ProviderName, Message</p>



<h4 class="wp-block-heading" style="font-size:21px">CMD (Windows) – basic network info</h4>



<p>ipconfig /all</p>



<h4 class="wp-block-heading" style="font-size:21px">Bash (Linux) – disk usage summary</h4>



<p>df -h</p>



<h4 class="wp-block-heading" style="font-size:21px">Troubleshooting</h4>



<p>If a command fails to run or returns unexpected output, the most common causes are:</p>



<ul class="wp-block-list">
<li>Wrong <strong>Type</strong> selected (e.g., Bash command on Windows)</li>



<li>Runtime not installed (e.g., PowerShell 7 missing for “PowerShell Core” commands)</li>



<li>OS differences (paths, tools, service managers)</li>



<li>Command is interactive or expects a TTY</li>
</ul>



<p><strong>Recommendation:</strong> Start with read-only diagnostics commands, then add remediation actions only after validation and clear approvals.</p>
</div><p>The post <a href="https://dev.xoap.io/fr/docs/commands-library/">Commands library</a> appeared first on <a href="https://dev.xoap.io/fr">XOAP</a>.</p>
]]></content:encoded>
					
					<wfw:commentrss>https://dev.xoap.io/fr/docs/commands-library/feed/</wfw:commentrss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>