<?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: PowerShell behaviour in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShell-behaviour/m-p/135008#M5508</link>
    <description>&lt;P&gt;I'm having trouble understanding because we can't see the entire code.&amp;nbsp; I ran you're code and it does work in my lab exactly as you stated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it's part of a larger script, it all depends on how your variables are defined, whether scoped properly.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are not willing to share the entire script, than, at least for myself, I cannot assist&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2017 11:03:28 GMT</pubDate>
    <dc:creator>JGPSHNTAP</dc:creator>
    <dc:date>2017-10-05T11:03:28Z</dc:date>
    <item>
      <title>PowerShell behaviour</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShell-behaviour/m-p/134966#M5504</link>
      <description>&lt;P&gt;Hello PSTK experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like seek guidence here. When I run this code just itself it displays all the fields and values. But when it is embeded into a bigger script (similar to 83upgrade check) it just displays the just Vserver value (not even the heading)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$OpenClient = Get-NcExportRule |where-object {$_.ClientMatch -eq "0.0.0.0/0" }&lt;BR /&gt;If ($OpenClient) {&lt;BR /&gt;write-host "Found export policy with open host access, need fixed or make sure no volume uses these policies" -ForegroundColor Red&lt;BR /&gt;$OpenClient&lt;BR /&gt;}&lt;BR /&gt;$AnyRule = Get-NcExportRule | where-object {$_.ClientMatch -ne "0.0.0.0/0" } | where-object {$_.RwRule -ne "sys" -or $_.RoRule -ne "sys" }&lt;BR /&gt;If($AnyRule) {&lt;BR /&gt;write-host " "&lt;BR /&gt;write-host "Found export policy with open rule access, doesn't fit our standard and need fixed" -ForegroundColor Red&lt;BR /&gt;$AnyRule&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;I tried with start-sleep for 2 seconds but same results. Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 14:31:31 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShell-behaviour/m-p/134966#M5504</guid>
      <dc:creator>storageguy</dc:creator>
      <dc:date>2025-06-04T14:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell behaviour</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShell-behaviour/m-p/134969#M5505</link>
      <description>&lt;P&gt;It's a little hard to troubleshoot if you are giving us working code and then telling us this doesn't work in the larger code.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 12:57:08 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShell-behaviour/m-p/134969#M5505</guid>
      <dc:creator>JGPSHNTAP</dc:creator>
      <dc:date>2017-10-04T12:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell behaviour</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShell-behaviour/m-p/134989#M5507</link>
      <description>&lt;P&gt;It is the same code (is working). My problem with the output. When that block of code run alone (pasted on PS command prompt) it works fine. But when it is called after few other functions it shows only vserver data (no headings or other data).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 23:02:28 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShell-behaviour/m-p/134989#M5507</guid>
      <dc:creator>storageguy</dc:creator>
      <dc:date>2017-10-04T23:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell behaviour</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShell-behaviour/m-p/135008#M5508</link>
      <description>&lt;P&gt;I'm having trouble understanding because we can't see the entire code.&amp;nbsp; I ran you're code and it does work in my lab exactly as you stated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it's part of a larger script, it all depends on how your variables are defined, whether scoped properly.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are not willing to share the entire script, than, at least for myself, I cannot assist&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 11:03:28 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShell-behaviour/m-p/135008#M5508</guid>
      <dc:creator>JGPSHNTAP</dc:creator>
      <dc:date>2017-10-05T11:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShell behaviour</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShell-behaviour/m-p/135051#M5510</link>
      <description>&lt;P&gt;Thanks for you time, again. I think I found the issue. When I changed the preceeding function output, it corrected it self.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 09:40:08 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShell-behaviour/m-p/135051#M5510</guid>
      <dc:creator>storageguy</dc:creator>
      <dc:date>2017-10-06T09:40:08Z</dc:date>
    </item>
  </channel>
</rss>

