{"id":681,"date":"2025-03-17T12:57:36","date_gmt":"2025-03-17T04:57:36","guid":{"rendered":"http:\/\/www.x4s.cn\/?p=681"},"modified":"2025-03-17T12:57:36","modified_gmt":"2025-03-17T04:57:36","slug":"citrix%e5%88%9b%e5%bb%ba%e4%b8%80%e4%b8%aa%e6%96%b0%e5%91%bd%e4%bb%a4%e4%bb%a5%e4%bc%a0%e9%80%81%e5%88%b0%e6%a1%8c%e9%9d%a2","status":"publish","type":"post","link":"http:\/\/www.x4s.cn\/?p=681","title":{"rendered":"Citrix\u521b\u5efa\u4e00\u4e2a\u65b0\u547d\u4ee4\u4ee5\u4f20\u9001\u5230\u684c\u9762"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">New-BrokerMachineCommand<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"syntax\"><a href=\"https:\/\/citrix.github.io\/delivery-controller-sdk\/Broker\/New-BrokerMachineCommand\/#syntax\">\u8bed\u6cd5<\/a><\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">New-BrokerMachineCommand -User &lt;String&gt; -Category &lt;String&gt; -CommandName &lt;String&gt; [-DesktopGroups &lt;DesktopGroup[]&gt;] [-SendTrigger &lt;MachineCommandTrigger&gt;] [-SendDeadline &lt;TimeSpan&gt;] [-CommandData &lt;Byte[]&gt;] [-LoggingId &lt;Guid&gt;] [-AdminAddress &lt;String&gt;] [&lt;CommonParameters&gt;]\n\nNew-BrokerMachineCommand -MachineUid &lt;Int32&gt; -Category &lt;String&gt; -CommandName &lt;String&gt; [-SendTrigger &lt;MachineCommandTrigger&gt;] [-SendDeadline &lt;TimeSpan&gt;] [-CommandData &lt;Byte[]&gt;] [-LoggingId &lt;Guid&gt;] [-AdminAddress &lt;String&gt;] [&lt;CommonParameters&gt;]\n\nNew-BrokerMachineCommand -SessionUid &lt;Int64&gt; -Category &lt;String&gt; -CommandName &lt;String&gt; [-SendTrigger &lt;MachineCommandTrigger&gt;] [-SendDeadline &lt;TimeSpan&gt;] [-CommandData &lt;Byte[]&gt;] [-LoggingId &lt;Guid&gt;] [-AdminAddress &lt;String&gt;] [&lt;CommonParameters&gt;]\n\nNew-BrokerMachineCommand -Synchronous -MachineUid &lt;Int32&gt; -Category &lt;String&gt; -CommandName &lt;String&gt; [-CommandData &lt;Byte[]&gt;] [-LoggingId &lt;Guid&gt;] [-AdminAddress &lt;String&gt;] [&lt;CommonParameters&gt;]\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"detailed-description\"><a href=\"https:\/\/citrix.github.io\/delivery-controller-sdk\/Broker\/New-BrokerMachineCommand\/#detailed-description\">\u8be6\u7ec6\u8bf4\u660e<\/a><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u521b\u5efa\u4e00\u4e2a\u6392\u961f\u7b49\u5f85\u4f20\u9001\u5230\u684c\u9762\u7684\u65b0\u547d\u4ee4\u3002\u547d\u4ee4\u4f7f\u7528 Category \u53c2\u6570\u53d1\u9001\u5230\u5b89\u88c5\u5728\u684c\u9762\u4e0a\u7684\u7279\u5b9a\u5904\u7406\u7a0b\u5e8f\u3002\u6bcf\u4e2a\u5904\u7406\u7a0b\u5e8f\u90fd\u6709\u81ea\u5df1\u7684\u547d\u4ee4\u5217\u8868\uff0c\u8fd9\u4e9b\u547d\u4ee4\u7531 CommandName \u53c2\u6570\u6807\u8bc6\u3002\u53ef\u4ee5\u4f7f\u7528 CommandData \u53c2\u6570\u4ee5\u5904\u7406\u7a0b\u5e8f\u6307\u5b9a\u7684\u683c\u5f0f\u63d0\u4f9b\u53ef\u9009\u547d\u4ee4\u6570\u636e\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u547d\u4ee4\u9488\u5bf9\u7279\u5b9a\u7528\u6237\u3001\u4f1a\u8bdd\u6216\u8ba1\u7b97\u673a\u3002\u9488\u5bf9\u7528\u6237\u7684\u547d\u4ee4\u53ef\u4ee5\u8fdb\u4e00\u6b65\u9650\u5236\u4e3a\u4e00\u4e2a\u6216\u591a\u4e2a\u684c\u9762\u7ec4\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SendTrigger \u7528\u4e8e\u5c06\u547d\u4ee4\u9650\u5236\u4e3a\u4e0e\u76ee\u6807\u76f8\u5173\u7684\u7279\u5b9a\u4e8b\u4ef6\u3002\u4f8b\u5982\uff0c\u5f53\u76ee\u6807\u8ba1\u7b97\u673a\u6ce8\u518c\u6216\u76ee\u6807\u7528\u6237\u91cd\u65b0\u8fde\u63a5\u5230\u4f1a\u8bdd\u65f6\u3002\u5f53\u76ee\u6807\u53d1\u751f SendTrigger \u65f6\uff0c\u8be5\u547d\u4ee4\u5c06\u53d1\u9001\u5230\u8ba1\u7b97\u673a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u63d0\u4f9b\u4e86 Synchronous \u5f00\u5173\uff0c\u5219\u76ee\u6807\u5fc5\u987b\u662f\u4e00\u53f0\u673a\u5668\uff0c\u5e76\u4e14\u4e0d\u80fd\u6307\u5b9a SendTrigger\u3002\u5982\u679c\u8ba1\u7b97\u673a\u5f53\u524d\u5df2\u6ce8\u518c\uff0c\u5219\u547d\u4ee4\u4f1a\u7acb\u5373\u53d1\u9001\u5230\u8ba1\u7b97\u673a\uff0c\u5982\u679c\u8ba1\u7b97\u673a\u672a\u6ce8\u518c\uff0c\u5219\u547d\u4ee4\u5c06\u5931\u8d25\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf7\u6ce8\u610f\uff0cCategory \u548c CommandName \u7684\u7ec4\u5408\u957f\u5ea6\u9650\u5236\u4e3a 64 \u4e2a\u5b57\u7b26\u3002Category \u548c CommandName \u5fc5\u987b\u5b8c\u5168\u662f\u5b57\u6bcd\u6570\u5b57\uff0c\u5e76\u4e14\u4e0d\u5305\u542b\u4efb\u4f55\u7a7a\u683c\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"related-commands\"><a href=\"https:\/\/citrix.github.io\/delivery-controller-sdk\/Broker\/New-BrokerMachineCommand\/#related-commands\">\u76f8\u5173\u547d\u4ee4<\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/citrix.github.io\/delivery-controller-sdk\/Broker\/Get-BrokerMachineCommand.html\">Get-BrokerMachineCommand<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/citrix.github.io\/delivery-controller-sdk\/Broker\/Remove-BrokerMachineCommand.html\">Remove-BrokerMachineCommand<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"parameters\"><a href=\"https:\/\/citrix.github.io\/delivery-controller-sdk\/Broker\/New-BrokerMachineCommand\/#parameters\">\u53c2\u6570<\/a><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u540d\u5b57<\/th><th>\u63cf\u8ff0<\/th><th>\u5fc5\u586b\uff1f<\/th><th>\u7ba1\u9053\u8f93\u5165<\/th><th>\u9ed8\u8ba4\u503c<\/th><\/tr><\/thead><tbody><tr><td>\u7c7b\u522b<\/td><td>\u8981\u5c06\u547d\u4ee4\u53d1\u9001\u5230\u7684\u684c\u9762\u4e0a\u7684\u670d\u52a1\u3002<\/td><td>\u771f<\/td><td>true \uff08ByPropertyName\uff09<\/td><td><\/td><\/tr><tr><td>\u547d\u4ee4\u540d\u79f0<\/td><td>\u8981\u53d1\u9001\u7684\u547d\u4ee4\u7684\u540d\u79f0\uff08\u7531\u670d\u52a1\u5b9a\u4e49\uff09\u3002<\/td><td>\u771f<\/td><td>true \uff08ByPropertyName\uff09<\/td><td><\/td><\/tr><tr><td>\u7528\u6237<\/td><td>\u5176\u684c\u9762\u6216\u4f1a\u8bdd\u5e94\u63a5\u6536\u547d\u4ee4\u7684\u7528\u6237\u3002<\/td><td>\u771f<\/td><td>true \uff08ByPropertyName\uff09<\/td><td>\u4efb\u4f55\u7528\u6237\u3002<\/td><\/tr><tr><td>\u673a\u5668 Uid<\/td><td>\u5e94\u63a5\u6536\u547d\u4ee4\u7684\u7279\u5b9a\u8ba1\u7b97\u673a\u3002<\/td><td>\u771f<\/td><td>true \uff08ByPropertyName\uff09<\/td><td><\/td><\/tr><tr><td>\u4f1a\u8bdd Uid<\/td><td>\u5f53\u524d\u767b\u5f55\u7684\u7528\u6237\u4f1a\u8bdd\u5e94\u63a5\u6536\u547d\u4ee4\u3002<\/td><td>\u771f<\/td><td>true \uff08ByPropertyName\uff09<\/td><td>\u4efb\u4f55\u4f1a\u8bdd\u3002<\/td><\/tr><tr><td>\u540c\u6b65<\/td><td>\u7acb\u5373\u53d1\u9001\u547d\u4ee4\u5e76\u5728\u7b49\u5f85\u56de\u590d\u65f6\u963b\u6b62\u3002<\/td><td>\u771f<\/td><td>\u5047<\/td><td>\u5047<\/td><\/tr><tr><td>\u547d\u4ee4\u6570\u636e<\/td><td>\u547d\u4ee4\u4e2d\u5305\u542b\u7684\u53ef\u9009\u9644\u52a0\u6570\u636e\u3002<\/td><td>\u5047<\/td><td>true \uff08ByPropertyName\uff09<\/td><td>\u6ca1\u6709<\/td><\/tr><tr><td>\u65e5\u5fd7\u8bb0\u5f55 ID<\/td><td>\u6307\u5b9a\u6b64 cmdlet \u8c03\u7528\u6784\u6210\u5176\u4e00\u90e8\u5206\u7684\u9ad8\u7ea7\u4f5c\u7684\u6807\u8bc6\u7b26\u3002Desktop Studio \u548c Desktop Director \u901a\u5e38\u4f1a\u521b\u5efa\u9ad8\u7ea7\u4f5c\u3002PowerShell \u811a\u672c\u8fd8\u53ef\u4ee5\u901a\u8fc7 Start-LogHighLevelOperation \u548c Stop-LogHighLevelOperation cmdlet \u5c06\u4e00\u7cfb\u5217 cmdlet \u8c03\u7528\u5305\u88c5\u5728\u9ad8\u7ea7\u4f5c\u4e2d\u3002<\/td><td>\u5047<\/td><td>\u5047<\/td><td><\/td><\/tr><tr><td>\u7ba1\u7406\u5458\u5730\u5740<\/td><td>\u6307\u5b9a PowerShell \u7ba1\u7406\u5355\u5143\u5c06\u8fde\u63a5\u5230\u7684 XenDesktop \u63a7\u5236\u5668\u7684\u5730\u5740\u3002\u8fd9\u53ef\u4ee5\u4f5c\u4e3a\u4e3b\u673a\u540d\u6216 IP \u5730\u5740\u63d0\u4f9b\u3002<\/td><td>\u5047<\/td><td>\u5047<\/td><td>\u672c\u5730\u4e3b\u673a\u3002\u4e00\u65e6\u4efb\u4f55 cmdlet \u63d0\u4f9b\u4e86\u503c\uff0c\u6b64\u503c\u5c06\u6210\u4e3a\u9ed8\u8ba4\u503c\u3002<\/td><\/tr><tr><td>\u684c\u9762\u7ec4<\/td><td>\u8fdb\u4e00\u6b65\u5c06\u9488\u5bf9\u7528\u6237\u7684\u547d\u4ee4\u9650\u5236\u4e3a\u8fd9\u4e9b\u684c\u9762\u7ec4\u4e2d\u7684\u8ba1\u7b97\u673a\u3002<\/td><td>\u5047<\/td><td>true \uff08ByPropertyName\uff09<\/td><td>\u4e0d\u53d7\u684c\u9762\u7ec4\u9650\u5236\u3002<\/td><\/tr><tr><td>\u53d1\u9001\u89e6\u53d1\u5668<\/td><td>\u5c06\u547d\u4ee4\u6392\u961f\u4ee5\u8fdb\u884c\u4f20\u9012\uff0c\u76f4\u5230\u6b64\u7279\u5b9a\u4e8b\u4ef6\u53d1\u751f\u3002\u6709\u6548\u503c\u4e3a NextContact\u3001Broker\u3001LogOn\u3001Logoff\u3001Disconnect \u548c Reconnect\u3002<\/td><td>\u5047<\/td><td>true \uff08ByPropertyName\uff09<\/td><td>\u9ed8\u8ba4\u503c\u4e3a &#8216;NextContact&#8217;\uff0c\u56e0\u6b64\u5728\u4e0b\u6b21\u4e0e\u684c\u9762\u901a\u4fe1\u65f6\u53d1\u9001\u547d\u4ee4\u3002<\/td><\/tr><tr><td>\u53d1\u9001\u622a\u6b62\u65f6\u95f4<\/td><td>\u5982\u679c\u5728\u6307\u5b9a\u7684\u65f6\u95f4\u8de8\u5ea6\u4e4b\u524d\u672a\u4f20\u9012\u547d\u4ee4\uff0c\u5219\u81ea\u52a8\u53d6\u6d88\u547d\u4ee4\u3002<\/td><td>\u5047<\/td><td>true \uff08ByPropertyName\uff09<\/td><td>\u547d\u4ee4\u5728 24 \u5c0f\u65f6\u540e\u8fc7\u671f\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"input-type\"><a href=\"https:\/\/citrix.github.io\/delivery-controller-sdk\/Broker\/New-BrokerMachineCommand\/#input-type\">\u8f93\u5165\u7c7b\u578b<\/a><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"none\"><a href=\"https:\/\/citrix.github.io\/delivery-controller-sdk\/Broker\/New-BrokerMachineCommand\/#none\">\u6ca1\u6709<\/a><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u63a5\u53d7\u6765\u81ea\u8f93\u5165\u7ba1\u9053\u7684\u53c2\u6570\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"return-values\"><a href=\"https:\/\/citrix.github.io\/delivery-controller-sdk\/Broker\/New-BrokerMachineCommand\/#return-values\">\u8fd4\u56de\u503c<\/a><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"citrixbrokeradminsdkmachinecommand\"><a href=\"https:\/\/citrix.github.io\/delivery-controller-sdk\/Broker\/New-BrokerMachineCommand\/#citrixbrokeradminsdkmachinecommand\">Citrix.Broker.Admin.SDK.MachineCommand<\/a><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6dfb\u52a0\u5230\u547d\u4ee4 queue.### Citrix.Broker.Admin.SDK.MachineSynchronousCommandResponse \u7684\u65b0\u547d\u4ee4 \u4f7f\u7528 Synchronous \u9009\u9879\u65f6\uff0c\u547d\u4ee4\u4f1a\u7acb\u5373\u53d1\u9001\u5230\u6307\u5b9a\u7684\u8ba1\u7b97\u673a\u5e76\u8fdb\u884c\u5904\u7406\u3002\u8fd4\u56de\u7684 SDK \u5bf9\u8c61\u63cf\u8ff0\u4e86\u547d\u4ee4\u4ee5\u53ca\u8be5\u547d\u4ee4\u5904\u7406\u7684\u7ed3\u679c\u3002## \u8bf4\u660e \u547d\u4ee4\u53d7\u57fa\u4e8e\u684c\u9762\u7ec4\u3001\u7c7b\u522b\u548c\u547d\u4ee4\u540d\u79f0\u7684\u59d4\u6258\u7ba1\u7406\u9650\u5236\u7684\u7ea6\u675f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"examples\"><a href=\"https:\/\/citrix.github.io\/delivery-controller-sdk\/Broker\/New-BrokerMachineCommand\/#examples\">\u4f8b\u5b50<\/a><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-1\"><a href=\"https:\/\/citrix.github.io\/delivery-controller-sdk\/Broker\/New-BrokerMachineCommand\/#example-1\">\u793a\u4f8b 1<\/a><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">New-BrokerMachineCommand -Category UserProfileManager -CommandName \"ResetUpmProfile\" -DesktopGroups 1 -CommandData $byteArray -SendTrigger logon -user domain1\\user1\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u63cf\u8ff0<br>&#8212;&#8212;&#8212;&#8211;<br>\u5f53\u7528\u6237 domain1\\user1 \u767b\u5f55\u5230\u684c\u9762\u7ec4 1 \u4e2d\u7684\u4efb\u4f55\u8ba1\u7b97\u673a\u65f6\uff0c\u6307\u793a User Profile Manager \u670d\u52a1\u4f7f\u7528\u7f16\u7801\u7684 $byteArray \u547d\u4ee4\u6570\u636e\u6267\u884c\u201cResetUpmProfile\u201d\u547d\u4ee4<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-2\"><a href=\"https:\/\/citrix.github.io\/delivery-controller-sdk\/Broker\/New-BrokerMachineCommand\/#example-2\">\u793a\u4f8b 2<\/a><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">New-BrokerMachineCommand -Synchronous -Category \"MonitorService\" -CommandName \"EnableLogging\" -MachineUid 13\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u63cf\u8ff0<br>&#8212;&#8212;&#8212;&#8211;<br>\u6307\u793a\u76d1\u63a7\u670d\u52a1\u7acb\u5373\u5728 Uid \u4e3a 13 \u7684\u673a\u5668\u4e0a\u6267\u884c EnableLogging \u547d\u4ee4\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>New-BrokerMachineCommand \u8bed\u6cd5 New-BrokerMachineCommand -U<br \/><a class=\"moretag\" href=\"http:\/\/www.x4s.cn\/?p=681\">+ Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-681","post","type-post","status-publish","format-standard","hentry","category-apps"],"_links":{"self":[{"href":"http:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/posts\/681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.x4s.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=681"}],"version-history":[{"count":1,"href":"http:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/posts\/681\/revisions"}],"predecessor-version":[{"id":682,"href":"http:\/\/www.x4s.cn\/index.php?rest_route=\/wp\/v2\/posts\/681\/revisions\/682"}],"wp:attachment":[{"href":"http:\/\/www.x4s.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.x4s.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=681"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.x4s.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}