<?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 E-series PowerShell Toolkit and Remove-NeVolume in Software Development Kit (SDK) and API Discussions</title>
    <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/E-series-PowerShell-Toolkit-and-Remove-NeVolume/m-p/125657#M2162</link>
    <description>&lt;P&gt;I'm trying out the PowerShell Toolkit for the E-series arrays and I've hit a bit of a snag.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Up to this point, I got the WebServices Proxy running and I have managed to get basic connectivity going.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My first script correlated all offline disks in Windows which were served from my E2712 and removed the mappings with Remove-NeVolumeMapping. This works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My intended next step was to actually deleted all unmapped volumes, and this is where I've encountered an error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Import-Module NetApp.SANtricity.PowerShell
$user = "rw"
$pwd = "rw"

$url1 = "http://localhost:8080/devmgr"

$cred = Get-NeProxyCredential -Url $url1 -ProxyUser $user -ProxyPwd $pwd

$storageSystems = Get-NeStorageSystem -Credential $cred

foreach ($storageSystem in $storageSystems)
{
 $volumes = Get-NeVolume -SystemId $storageSystem.Wwn
    $volumeMappings = Get-NeVolumeMappings -SystemId $storageSystem.Wwn
    
    foreach ($volume in $volumes)
    {
        if ($volumeMappings.VolumeRef.Substring(8).IndexOf($volume.Wwn) -eq -1) # The volume is NOT mapped, ie the index is -1
        {
            Remove-NeVolume -SystemId $storageSystem.Wwn -Id $volume.Wwn -Credential $cred
        }
    }
}&lt;/PRE&gt;&lt;P&gt;This errors out with:&lt;/P&gt;&lt;PRE&gt;Remove-NeVolume : Processing class 'devmgr.api.symbol.KeyValueTagMappingDeletionDescriptorList'
At C:\Users\Administrator\Documents\deleteUnmappedVolumes1.ps1:20 char:13
+             Remove-NeVolume -SystemId $storageSystem.Wwn -Id $volume.Wwn -Creden ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Remove-NeVolume], NetAppPowerShellException
    + FullyQualifiedErrorId : parameterError,Netapp.Santricity.PowerShell.RemoveVolumeCmdlet&lt;/PRE&gt;&lt;P&gt;Not much to go on. I'm certain my credentials and call of the storage system is correct, I use the same syntax in a previous script to remove mappings, and that works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 18:10:01 GMT</pubDate>
    <dc:creator>ChannelTapeFibre</dc:creator>
    <dc:date>2025-06-04T18:10:01Z</dc:date>
    <item>
      <title>E-series PowerShell Toolkit and Remove-NeVolume</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/E-series-PowerShell-Toolkit-and-Remove-NeVolume/m-p/125657#M2162</link>
      <description>&lt;P&gt;I'm trying out the PowerShell Toolkit for the E-series arrays and I've hit a bit of a snag.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Up to this point, I got the WebServices Proxy running and I have managed to get basic connectivity going.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My first script correlated all offline disks in Windows which were served from my E2712 and removed the mappings with Remove-NeVolumeMapping. This works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My intended next step was to actually deleted all unmapped volumes, and this is where I've encountered an error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Import-Module NetApp.SANtricity.PowerShell
$user = "rw"
$pwd = "rw"

$url1 = "http://localhost:8080/devmgr"

$cred = Get-NeProxyCredential -Url $url1 -ProxyUser $user -ProxyPwd $pwd

$storageSystems = Get-NeStorageSystem -Credential $cred

foreach ($storageSystem in $storageSystems)
{
 $volumes = Get-NeVolume -SystemId $storageSystem.Wwn
    $volumeMappings = Get-NeVolumeMappings -SystemId $storageSystem.Wwn
    
    foreach ($volume in $volumes)
    {
        if ($volumeMappings.VolumeRef.Substring(8).IndexOf($volume.Wwn) -eq -1) # The volume is NOT mapped, ie the index is -1
        {
            Remove-NeVolume -SystemId $storageSystem.Wwn -Id $volume.Wwn -Credential $cred
        }
    }
}&lt;/PRE&gt;&lt;P&gt;This errors out with:&lt;/P&gt;&lt;PRE&gt;Remove-NeVolume : Processing class 'devmgr.api.symbol.KeyValueTagMappingDeletionDescriptorList'
At C:\Users\Administrator\Documents\deleteUnmappedVolumes1.ps1:20 char:13
+             Remove-NeVolume -SystemId $storageSystem.Wwn -Id $volume.Wwn -Creden ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Remove-NeVolume], NetAppPowerShellException
    + FullyQualifiedErrorId : parameterError,Netapp.Santricity.PowerShell.RemoveVolumeCmdlet&lt;/PRE&gt;&lt;P&gt;Not much to go on. I'm certain my credentials and call of the storage system is correct, I use the same syntax in a previous script to remove mappings, and that works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 18:10:01 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/E-series-PowerShell-Toolkit-and-Remove-NeVolume/m-p/125657#M2162</guid>
      <dc:creator>ChannelTapeFibre</dc:creator>
      <dc:date>2025-06-04T18:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: E-series PowerShell Toolkit and Remove-NeVolume</title>
      <link>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/E-series-PowerShell-Toolkit-and-Remove-NeVolume/m-p/125660#M2163</link>
      <description>&lt;P&gt;Replying to myself, I figured out my error.&lt;/P&gt;&lt;PRE&gt;Remove-NeVolume -SystemId $storageSystem.Wwn -Id $volume.Id -Credential $cred&lt;/PRE&gt;&lt;P&gt;Is the correct syntax. I was using $volume.wwn, in my first attempt, and when I changed it to above it works.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 13:12:22 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussions/E-series-PowerShell-Toolkit-and-Remove-NeVolume/m-p/125660#M2163</guid>
      <dc:creator>ChannelTapeFibre</dc:creator>
      <dc:date>2016-11-24T13:12:22Z</dc:date>
    </item>
  </channel>
</rss>

