{"id":2887,"date":"2013-09-10T11:59:00","date_gmt":"2013-09-10T11:59:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2013\/09\/10\/powertip-publish-data-to-orchestrator-data-bus\/"},"modified":"2013-09-10T11:59:00","modified_gmt":"2013-09-10T11:59:00","slug":"powertip-publish-data-to-orchestrator-data-bus","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-publish-data-to-orchestrator-data-bus\/","title":{"rendered":"PowerTip: Publish Data to Orchestrator Data Bus"},"content":{"rendered":"<p><strong>Summary<\/strong>: Publish Windows PowerShell data to the Orchestrator data bus.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\" \/>&nbsp;Can I access data in my Windows PowerShell script from within Orchestrator?<\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\" \/>Select&nbsp;<strong>Published Data<\/strong>&nbsp;in the&nbsp;<strong>Run .NET Script<\/strong>&nbsp;activity, click&nbsp;<strong>Add<\/strong>, and fill in the details for the object you want to publish:<\/p>\n<p style=\"padding-left: 120px\">&ldquo;Name&rdquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name you wish to use on the Databus<br \/>&ldquo;Type&rdquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Type of .NET Object, Date\/Time, String or Integer<br \/>&ldquo;Variable Name&rdquo; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PowerShell Object Name without the &ldquo;$&rdquo;<\/p>\n<p style=\"padding-left: 60px\">For example:<\/p>\n<p style=\"padding-left: 120px\">PowerShell<\/p>\n<p style=\"padding-left: 120px\">$UserName=&rdquo;John Smith&rdquo;<\/p>\n<p style=\"padding-left: 120px\">Orchestrator Published Data option in &ldquo;Run .NET Script&rdquo;<\/p>\n<p style=\"padding-left: 120px\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7367.PowerTipGraphic.png\"><img decoding=\"async\" title=\"Image of menu\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/7367.PowerTipGraphic.png\" alt=\"Image of menu\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Publish Windows PowerShell data to the Orchestrator data bus. &nbsp;Can I access data in my Windows PowerShell script from within Orchestrator? Select&nbsp;Published Data&nbsp;in the&nbsp;Run .NET Script&nbsp;activity, click&nbsp;Add, and fill in the details for the object you want to publish: &ldquo;Name&rdquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name you wish to use on the Databus&ldquo;Type&rdquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Type of .NET Object, Date\/Time, String [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[56,356,154,45],"class_list":["post-2887","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-guest-blogger","tag-powertip","tag-sean-kearney","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Publish Windows PowerShell data to the Orchestrator data bus. &nbsp;Can I access data in my Windows PowerShell script from within Orchestrator? Select&nbsp;Published Data&nbsp;in the&nbsp;Run .NET Script&nbsp;activity, click&nbsp;Add, and fill in the details for the object you want to publish: &ldquo;Name&rdquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name you wish to use on the Databus&ldquo;Type&rdquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Type of .NET Object, Date\/Time, String [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=2887"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2887\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=2887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=2887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=2887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}