<p>Execute a command, previously registered with <ahref="/api/@podman-desktop/namespaces/commands/functions/registerCommand">commands.registerCommand</a>.</p>
<p>For an example, see <ahref="/api/@podman-desktop/namespaces/commands">commands</a>.</p>
<h2class="anchor anchorWithStickyNavbar_JmGV"id="type-parameters">Type Parameters<ahref="#type-parameters"class="hash-link"aria-label="Direct link to Type Parameters"title="Direct link to Type Parameters"></a></h2>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="t">T<ahref="#t"class="hash-link"aria-label="Direct link to T"title="Direct link to T"></a></h3>
<h2class="anchor anchorWithStickyNavbar_JmGV"id="parameters">Parameters<ahref="#parameters"class="hash-link"aria-label="Direct link to Parameters"title="Direct link to Parameters"></a></h2>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="command">command<ahref="#command"class="hash-link"aria-label="Direct link to command"title="Direct link to command"></a></h3>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="rest">rest<ahref="#rest"class="hash-link"aria-label="Direct link to rest"title="Direct link to rest"></a></h3>
<h2class="anchor anchorWithStickyNavbar_JmGV"id="returns">Returns<ahref="#returns"class="hash-link"aria-label="Direct link to Returns"title="Direct link to Returns"></a></h2>
<h2class="anchor anchorWithStickyNavbar_JmGV"id="throws">Throws<ahref="#throws"class="hash-link"aria-label="Direct link to Throws"title="Direct link to Throws"></a></h2>
<h2class="anchor anchorWithStickyNavbar_JmGV"id="throws-1">Throws<ahref="#throws-1"class="hash-link"aria-label="Direct link to Throws"title="Direct link to Throws"></a></h2>
<p>if the command throws an exception</p></div></article><navclass="docusaurus-mt-lg pagination-nav"aria-label="Docs pages"><aclass="pagination-nav__link pagination-nav__link--prev"href="/api/@podman-desktop/namespaces/commands"><divclass="pagination-nav__sublabel">Previous</div><divclass="pagination-nav__label">commands</div></a><aclass="pagination-nav__link pagination-nav__link--next"href="/api/@podman-desktop/namespaces/commands/functions/registerCommand"><divclass="pagination-nav__sublabel">Next</div><divclass="pagination-nav__label">registerCommand</div></a></nav></div></div><divclass="col col--3"><divclass="tableOfContents_XG6w thin-scrollbar theme-doc-toc-desktop"><ulclass="table-of-contents table-of-contents__left-border"><li><ahref="#type-parameters"class="table-of-contents__link toc-highlight">Type Parameters</a><ul><li><ahref="#t"class="table-of-contents__link toc-highlight">T</a></li></ul></li><li><ahref="#parameters"class="table-of-contents__link toc-highlight">Parameters</a><ul><li><ahref="#command"class="table-of-contents__link toc-highlight">command</a></li><li><ahref="#rest"class="table-of-contents__link toc-highlight">rest</a></li></ul></li><li><ahref="#returns"class="table-of-contents__link toc-highlight">Returns</a></li><li><ahref="#throws"class="table-of-contents__link toc-highlight">Throws</a></li><li><ahref="#throws-1"class="table-of-contents__link toc-highlight">Throws</a></li></ul></div></div></div></div></main></div></div></div><footerclass="theme-layout-footer footer"><divclass="container container-fluid"><divclass="row footer__links"><divclass="theme-layout-footer-column col footer__col"><divclass="footer__title">Documentation</div><ulclass="footer__items clean-list"><liclass="footer__item"><aclass="footer__link-item"href="/docs/installation">Installing Podman Desktop</a></li><liclass="footer__item"><aclass="footer__link-item"href="/docs/migrating-from-docker">Migrating from Docker</a></li><liclass="footer__item"><aclass="footer__link-item"href="/docs/kubernetes">Working with Kubernetes</a></li><liclass="footer__item"><aclass="footer__link-item"href="/docs/troubleshooting">Troubleshooting</a></li></ul></div><divclass="theme-layout-footer-column col footer__col"><divclass="footer__title">Links</div><ulclass="footer__items clean-list"><liclass="footer__item"><ahref="https://github.com/podman-desktop/podman-desktop"target="_blank"rel="noopener noreferrer"class="footer__link-item">GitHub<svgwidth="13.5"height="13.5"aria-hidden="true"class="iconExternalLink_nPrP"><usehref="#theme-svg-external-link"></use></svg></a></li><liclass="footer__item"><ahref="https://discord.com/invite/x5GzFF6QH4"target="_blank"rel="noopener noreferrer"class="footer__link-item">Chat (bridged): #podman-desktop on Discord<svgwidth="13.5"height="13.5"aria-hidden="true"class="iconExternalLink_nPrP"><usehref="#theme-svg-external-link"></use></svg></a></li><liclass="footer__item"><ahref="https://github.com/podman-desktop/podman-desktop#communication"target="_blank"rel="noopener noreferrer"class="footer__link-item">Other ways to Communicate<svgwidth="13.5"height="13.5"aria-hidden="true"class="iconExternalLink_nPrP"><usehref="#theme-svg-external-link"></use></svg></a></li><liclass="footer__item"><ahref="https://github.com/orgs/podman-desktop/projects/4/views/3"target="_blank"rel="noopener noreferrer"class="footer__link-item">Current Sprint<svgwidth="13.5"height="13.5"aria-hidden="true"class="iconExternalLink_nPrP"><usehref="#theme-svg-external-link"></use></svg></a></li></ul></div></div><divclass="footer__bottom text--center"><divclass="footer__copyright">