<?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 Add server with multiple scopes using PowerShell in HPE OneView</title>
    <link>https://community.hpe.com/t5/hpe-oneview/add-server-with-multiple-scopes-using-powershell/m-p/7072599#M4792</link>
    <description>&lt;P&gt;OK to&amp;nbsp; post OneView PowerShell questions in this forum?&amp;nbsp; If so, here is my question:&lt;/P&gt;&lt;P&gt;Is it possible to specify multiple scopes when using Add-HPOVServer?&amp;nbsp; The Help says it is an "array" but when I try to specify multiple scopes it fails.&amp;nbsp; When I try just one scope, it works fine.&lt;/P&gt;&lt;P&gt;In our environment, we have one scope for All Windows servers - so that the team that supports WIndows servers can SEE and MANAGE those devices.&amp;nbsp; Then we have one or more additional scopes just for alerts.&amp;nbsp; So if a server is in the "Jonny's Servers" scope, only Jonny will get the email alerts for those servers.&amp;nbsp; So thus a server could be in two different scopes.&lt;/P&gt;&lt;P&gt;I have tried this:&lt;/P&gt;&lt;P&gt;Add-HPOVServer -ApplianceConnection $Conn -Hostname "SERVERILO" -Credential $ILOCred -Scope $Scope1, $Scope2 -Monitored:$true&lt;/P&gt;&lt;P&gt;and also creating an array of scopes, using the Get-HPOVScope cmdlet and a WHERE-OBJECT clause:&lt;/P&gt;&lt;P&gt;Add-HPOVServer -ApplianceConnection $Conn -Hostname "SERVERILO" -Credential $ILOCred -Scope $Scopes -Monitored:$true&lt;/P&gt;&lt;P&gt;But both attempts fails.&amp;nbsp; It seems like it will only accept a single scope, not an array.&amp;nbsp; The help says this (which you can see mentions array):&lt;/P&gt;&lt;P&gt;-Scope [&amp;lt;Array&amp;gt;]&lt;BR /&gt;Provide an array of &amp;lt;HPOneView.Appliance.ScopeResource&amp;gt; Scope resource(s) to initially add.&lt;BR /&gt;&lt;BR /&gt;Required? false&lt;BR /&gt;Position? named&lt;BR /&gt;Default value&lt;BR /&gt;Accept pipeline input? false&lt;BR /&gt;Accept wildcard characters? false&lt;/P&gt;&lt;P&gt;Any suggestions on what I am doing wrong?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;NK&lt;/P&gt;</description>
    <pubDate>Wed, 11 Dec 2019 19:52:15 GMT</pubDate>
    <dc:creator>NJK-Work</dc:creator>
    <dc:date>2019-12-11T19:52:15Z</dc:date>
    <item>
      <title>Add server with multiple scopes using PowerShell</title>
      <link>https://community.hpe.com/t5/hpe-oneview/add-server-with-multiple-scopes-using-powershell/m-p/7072599#M4792</link>
      <description>&lt;P&gt;OK to&amp;nbsp; post OneView PowerShell questions in this forum?&amp;nbsp; If so, here is my question:&lt;/P&gt;&lt;P&gt;Is it possible to specify multiple scopes when using Add-HPOVServer?&amp;nbsp; The Help says it is an "array" but when I try to specify multiple scopes it fails.&amp;nbsp; When I try just one scope, it works fine.&lt;/P&gt;&lt;P&gt;In our environment, we have one scope for All Windows servers - so that the team that supports WIndows servers can SEE and MANAGE those devices.&amp;nbsp; Then we have one or more additional scopes just for alerts.&amp;nbsp; So if a server is in the "Jonny's Servers" scope, only Jonny will get the email alerts for those servers.&amp;nbsp; So thus a server could be in two different scopes.&lt;/P&gt;&lt;P&gt;I have tried this:&lt;/P&gt;&lt;P&gt;Add-HPOVServer -ApplianceConnection $Conn -Hostname "SERVERILO" -Credential $ILOCred -Scope $Scope1, $Scope2 -Monitored:$true&lt;/P&gt;&lt;P&gt;and also creating an array of scopes, using the Get-HPOVScope cmdlet and a WHERE-OBJECT clause:&lt;/P&gt;&lt;P&gt;Add-HPOVServer -ApplianceConnection $Conn -Hostname "SERVERILO" -Credential $ILOCred -Scope $Scopes -Monitored:$true&lt;/P&gt;&lt;P&gt;But both attempts fails.&amp;nbsp; It seems like it will only accept a single scope, not an array.&amp;nbsp; The help says this (which you can see mentions array):&lt;/P&gt;&lt;P&gt;-Scope [&amp;lt;Array&amp;gt;]&lt;BR /&gt;Provide an array of &amp;lt;HPOneView.Appliance.ScopeResource&amp;gt; Scope resource(s) to initially add.&lt;BR /&gt;&lt;BR /&gt;Required? false&lt;BR /&gt;Position? named&lt;BR /&gt;Default value&lt;BR /&gt;Accept pipeline input? false&lt;BR /&gt;Accept wildcard characters? false&lt;/P&gt;&lt;P&gt;Any suggestions on what I am doing wrong?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;NK&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 19:52:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/add-server-with-multiple-scopes-using-powershell/m-p/7072599#M4792</guid>
      <dc:creator>NJK-Work</dc:creator>
      <dc:date>2019-12-11T19:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Add server with multiple scopes using PowerShell</title>
      <link>https://community.hpe.com/t5/hpe-oneview/add-server-with-multiple-scopes-using-powershell/m-p/7072609#M4794</link>
      <description>&lt;P&gt;This is a bug.&amp;nbsp; You &lt;A href="https://github.com/HewlettPackard/POSH-HPOneView/issues/438" target="_blank" rel="noopener"&gt;already submitted an issue&lt;/A&gt; to the tracker.&amp;nbsp; So please continue this discussion over there.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 21:44:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/add-server-with-multiple-scopes-using-powershell/m-p/7072609#M4794</guid>
      <dc:creator>ChrisLynch</dc:creator>
      <dc:date>2019-12-11T21:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Add server with multiple scopes using PowerShell</title>
      <link>https://community.hpe.com/t5/hpe-oneview/add-server-with-multiple-scopes-using-powershell/m-p/7072612#M4795</link>
      <description>&lt;P&gt;Apologies - I discovered the GitHub repo after posting on this forum.&lt;/P&gt;&lt;P&gt;Thanks for the help so far.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 22:35:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/add-server-with-multiple-scopes-using-powershell/m-p/7072612#M4795</guid>
      <dc:creator>NJK-Work</dc:creator>
      <dc:date>2019-12-11T22:35:24Z</dc:date>
    </item>
  </channel>
</rss>

