<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Task PowerShell script - How to use PowerShell 7.x in HPE Morpheus Enterprise</title>
    <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/task-powershell-script-how-to-use-powershell-7-x/m-p/7248715#M1889</link>
    <description>&lt;P&gt;The PowerShell task calls PowerShell.exe (version 5).&lt;/P&gt;
&lt;P&gt;Unfortunately, I’m not aware of any method to alter this. However, it might be beneficial to suggest this as an idea for improvement! Feel free to share your idea here. &lt;A href="https://discuss.morpheusdata.com/c/ideas/15" class="inline-onebox"&gt;Ideas - Morpheus&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;One way around this &lt;EM&gt;might&lt;/EM&gt; be to use a file template to place the script onto the VM and start the process from PS 5 using Start-Process.&lt;/P&gt;
&lt;P&gt;Start-Process -FilePath “pwsh.exe” -ArgumentList “-File &lt;CODE style="background : #f0f1f2;"&gt;.\PowerShellScript.ps1&lt;/CODE&gt;” -Wait&lt;/P&gt;
&lt;P&gt;There could be a better approach out there, this is just what initially came to mind&lt;/P&gt;</description>
    <pubDate>Fri, 01 Mar 2024 13:46:46 GMT</pubDate>
    <dc:creator>tyboyd</dc:creator>
    <dc:date>2024-03-01T13:46:46Z</dc:date>
    <item>
      <title>Task PowerShell script - How to use PowerShell 7.x</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/task-powershell-script-how-to-use-powershell-7-x/m-p/7248712#M1886</link>
      <description>&lt;P&gt;I have a task that runs a cmdlet that requires PowerShell 7.  Tasks that have the type PowerShell Script default to Windows PowerShell 5.x.  How do I get Morpheus to use PowerShell 7 instead?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 09:49:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/task-powershell-script-how-to-use-powershell-7-x/m-p/7248712#M1886</guid>
      <dc:creator>CA1239945</dc:creator>
      <dc:date>2024-03-01T09:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Task PowerShell script - How to use PowerShell 7.x</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/task-powershell-script-how-to-use-powershell-7-x/m-p/7248713#M1887</link>
      <description>&lt;P&gt;Thank you both. I was able to workaround my issue by using pwsh.exe -c parameter.  I have submitted an idea as suggested.  &lt;IMG src="https://emoji.discourse-cdn.com/twitter/slightly_smiling_face.png?v=12" title=":slightly_smiling_face:" class="emoji" alt=":slightly_smiling_face:" loading="lazy" width="20" height="20" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 14:18:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/task-powershell-script-how-to-use-powershell-7-x/m-p/7248713#M1887</guid>
      <dc:creator>CA1239945</dc:creator>
      <dc:date>2024-03-04T14:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Task PowerShell script - How to use PowerShell 7.x</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/task-powershell-script-how-to-use-powershell-7-x/m-p/7248714#M1888</link>
      <description>&lt;P&gt;you could look to wrap your powershell script like this in the Morpheus powershell task&lt;/P&gt;
&lt;P&gt;pwsh -c {$PSVersionTable}&lt;/P&gt;
&lt;P&gt;Also I think this would be a great idea for you to raise in our ideas section. I think there should be a selection on the powershell task to run windows powershell either under powershell.exe or pwsh&lt;/P&gt;
&lt;ASIDE class="onebox category-onebox" style="box-shadow: -5px 0px #c3e3f3;"&gt;
  &lt;ARTICLE class="onebox-body category-onebox-body"&gt;
      &lt;DIV class="aspect-image" style="--aspect-ratio:140/140;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="78d8be134643fb51cac8219ea3fdaef247610f82.png"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/149632iF3DE4C99F63A9C15/image-size/large?v=v2&amp;amp;px=2000" role="button" title="78d8be134643fb51cac8219ea3fdaef247610f82.png" alt="78d8be134643fb51cac8219ea3fdaef247610f82.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
    &lt;H3&gt;
      &lt;A class="badge-category__wrapper" href="https://community.hpe.com/c/ideas/15"&gt;
         &lt;SPAN class="badge-category__name"&gt;Ideas&lt;/SPAN&gt;
       
      &lt;/A&gt;
    &lt;/H3&gt;
      &lt;DIV&gt;
        &lt;SPAN class="description"&gt;
          &lt;P&gt;Ideas is an opportunity for the community to voice their desired functionality with the Morpheus platform.  Topics will be reviewed prior to posting to ensure safety for the customer(s).  Once posted, users can vote for topics they are in favor of.  There are a limited number of votes that can be cast based on your forum ranking until a topic is closed or a vote is rescinded&lt;/P&gt;
        &lt;/SPAN&gt;
      &lt;/DIV&gt;
  &lt;/ARTICLE&gt;
  &lt;DIV class="clearfix"&gt;&lt;/DIV&gt;
&lt;/ASIDE&gt;</description>
      <pubDate>Fri, 01 Mar 2024 14:07:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/task-powershell-script-how-to-use-powershell-7-x/m-p/7248714#M1888</guid>
      <dc:creator>rbmorph</dc:creator>
      <dc:date>2024-03-01T14:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Task PowerShell script - How to use PowerShell 7.x</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/task-powershell-script-how-to-use-powershell-7-x/m-p/7248715#M1889</link>
      <description>&lt;P&gt;The PowerShell task calls PowerShell.exe (version 5).&lt;/P&gt;
&lt;P&gt;Unfortunately, I’m not aware of any method to alter this. However, it might be beneficial to suggest this as an idea for improvement! Feel free to share your idea here. &lt;A href="https://discuss.morpheusdata.com/c/ideas/15" class="inline-onebox"&gt;Ideas - Morpheus&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;One way around this &lt;EM&gt;might&lt;/EM&gt; be to use a file template to place the script onto the VM and start the process from PS 5 using Start-Process.&lt;/P&gt;
&lt;P&gt;Start-Process -FilePath “pwsh.exe” -ArgumentList “-File &lt;CODE style="background : #f0f1f2;"&gt;.\PowerShellScript.ps1&lt;/CODE&gt;” -Wait&lt;/P&gt;
&lt;P&gt;There could be a better approach out there, this is just what initially came to mind&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 13:46:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/task-powershell-script-how-to-use-powershell-7-x/m-p/7248715#M1889</guid>
      <dc:creator>tyboyd</dc:creator>
      <dc:date>2024-03-01T13:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Task PowerShell script - How to use PowerShell 7.x</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/task-powershell-script-how-to-use-powershell-7-x/m-p/7248716#M1890</link>
      <description>&lt;P&gt;Thanks for the quick reply, I’ll give that a go.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 13:57:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/task-powershell-script-how-to-use-powershell-7-x/m-p/7248716#M1890</guid>
      <dc:creator>CA1239945</dc:creator>
      <dc:date>2024-03-01T13:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Task PowerShell script - How to use PowerShell 7.x</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/task-powershell-script-how-to-use-powershell-7-x/m-p/7248717#M1891</link>
      <description>&lt;P&gt;you could look to wrap your powershell script like this in the Morpheus powershell task&lt;/P&gt;
&lt;P&gt;pwsh -c {$PSVersionTable}&lt;/P&gt;
&lt;P&gt;Also I think this would be a great idea for you to raise in our ideas section. I think there should be a selection on the powershell task to run windows powershell either under powershell.exe or pwsh&lt;/P&gt;
&lt;ASIDE class="onebox category-onebox" style="box-shadow: -5px 0px #c3e3f3;"&gt;
  &lt;ARTICLE class="onebox-body category-onebox-body"&gt;
      &lt;DIV class="aspect-image" style="--aspect-ratio:140/140;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="78d8be134643fb51cac8219ea3fdaef247610f82.png"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/149632iF3DE4C99F63A9C15/image-size/large?v=v2&amp;amp;px=2000" role="button" title="78d8be134643fb51cac8219ea3fdaef247610f82.png" alt="78d8be134643fb51cac8219ea3fdaef247610f82.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
    &lt;H3&gt;
      &lt;A class="badge-category__wrapper" href="https://community.hpe.com/c/ideas/15"&gt;
         &lt;SPAN class="badge-category__name"&gt;Ideas&lt;/SPAN&gt;
       
      &lt;/A&gt;
    &lt;/H3&gt;
      &lt;DIV&gt;
        &lt;SPAN class="description"&gt;
          &lt;P&gt;Ideas is an opportunity for the community to voice their desired functionality with the Morpheus platform.  Topics will be reviewed prior to posting to ensure safety for the customer(s).  Once posted, users can vote for topics they are in favor of.  There are a limited number of votes that can be cast based on your forum ranking until a topic is closed or a vote is rescinded&lt;/P&gt;
        &lt;/SPAN&gt;
      &lt;/DIV&gt;
  &lt;/ARTICLE&gt;
  &lt;DIV class="clearfix"&gt;&lt;/DIV&gt;
&lt;/ASIDE&gt;</description>
      <pubDate>Fri, 01 Mar 2024 14:00:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/task-powershell-script-how-to-use-powershell-7-x/m-p/7248717#M1891</guid>
      <dc:creator>rbmorph</dc:creator>
      <dc:date>2024-03-01T14:00:14Z</dc:date>
    </item>
  </channel>
</rss>

