<?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: PowerShelll Error: Method invocation failed because .... in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/98832#M4102</link>
    <description>&lt;P&gt;Thanks Mark&lt;/P&gt;&lt;P&gt;Will give this &amp;nbsp;a go&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jan 2015 02:00:34 GMT</pubDate>
    <dc:creator>rdenyer001</dc:creator>
    <dc:date>2015-01-05T02:00:34Z</dc:date>
    <item>
      <title>PowerShelll Error: Method invocation failed because ....</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/98800#M4097</link>
      <description>&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;Very new to scripting/powershell &amp;nbsp; &amp;nbsp;and have &amp;nbsp;a task to &amp;nbsp;move &amp;nbsp; many &amp;nbsp;viloumes from and old 7-mode filer &amp;nbsp;7.3.6 &amp;nbsp;to a new filer &amp;nbsp;7 mode 8.2.2 (unfortunealty can't go cDOT)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to write a script that will allow me to put in the name of the &amp;nbsp;volume on the old system and its size &amp;nbsp;and then have the script &amp;nbsp; create the volume on the new system and then complete the snap mirror initialize.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here &amp;nbsp;is my script &amp;nbsp;( made up of parts copied from various scripts found on the web)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;## Controller Login Variables&lt;/STRONG&gt;&lt;BR /&gt;Import-Module dataontap&lt;BR /&gt;$ntapuser = "XXXX"&lt;BR /&gt;$ntappw = "XXXX"&lt;BR /&gt;&lt;STRONG&gt;### Convert Password to plain text&lt;/STRONG&gt;&lt;BR /&gt;$pw = convertto-securestring $ntappw -asplaintext -force&lt;BR /&gt;$cred = new-object -typename system.management.automation.pscredential -argumentlist $ntapuser,$pw&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;# Connect to Snapmirror Source and Destination&lt;/STRONG&gt;&lt;BR /&gt;$SrcFiler = Connect-NaController XXXX -Credential $cred -https&lt;BR /&gt;$DestFiler = Connect-NaController XXXX -Credential $cred -https&lt;BR /&gt;&lt;STRONG&gt;#set volume name and size&lt;/STRONG&gt;&lt;BR /&gt;$Vol = Read-Host 'Volume Name?'&lt;BR /&gt;$Size = Read-Host 'Volume Size?'&lt;BR /&gt;$Scr = $SrcFiler + ":" + $Vol&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;I get this error&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;Method invocation failed because [NetApp.Ontapi.Filer.NaController] doesn't contain a method named 'op_Addition&lt;/FONT&gt; &lt;/SPAN&gt;&lt;BR /&gt;$Dest = $DestFiler + ":" + $Vol&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;and here&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;# Create our destination volume&lt;/STRONG&gt;&lt;BR /&gt;New-NaVol $Vol -Controller $DestFiler -Aggregate aggr0 -Size $Size -SpaceReserve none&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;I get this error here &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;New-NaVol : Object reference not set to an instance of an object.&lt;BR /&gt;At C:\Users\Richard\NewMirror2.ps1:18 char:1&amp;nbsp;+ New-NaVol $Vol -Controller $DestFiler -Aggregate aggr0 -Size $Size -SpaceReserve&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;But the volume is created&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;Set-NaVol -Name $Vol -Restricted -Controller $DestFiler&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Same here&amp;nbsp;Set-NaVol : Object reference not set to an instance of an object.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;At C:\Users\Richard\NewMirror2.ps1:19 char:1 &amp;nbsp;+ Set-NaVol -Name $Vol -Restricted -Controller $DestFiler&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;but the volume is restricted&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;# Initialize Snapmirror&lt;/STRONG&gt;&lt;BR /&gt;Invoke-NaSnapmirrorInitialize -Destination $Dest -Source $Scr&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;But then here, &amp;nbsp;this just fails &amp;nbsp; but I figure that &amp;nbsp;is more related to the first error &amp;nbsp;at line 15 &amp;nbsp;and 16&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have downloaed and installed latest toolkit&amp;nbsp;&lt;/P&gt;&lt;P&gt;have noticed that &amp;nbsp;results coming back from the new 8.2.2 system &amp;nbsp;(destination) &amp;nbsp; are a LOT slower than the old 7.3.6 &amp;nbsp;system&lt;/P&gt;&lt;P&gt;Any help and or suggestions would be greatly appriciated .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the total &amp;nbsp;out put from my powershell session&lt;/P&gt;&lt;P&gt;PS C:\Users\Richard&amp;gt; .\NewMirror2&lt;BR /&gt;Volume Name?: TestVOL&lt;BR /&gt;Volume Size?: 40g&lt;BR /&gt;Method invocation failed because [NetApp.Ontapi.Filer.NaController] doesn't contain a method named 'op_Addition'.&lt;BR /&gt;At C:\Users\Richard\NewMirror2.ps1:15 char:1&lt;BR /&gt;+ $Scr = $SrcFiler + ":" + $Vol&lt;BR /&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;+ CategoryInfo : InvalidOperation: (op_Addition:String) [], RuntimeException&lt;BR /&gt;+ FullyQualifiedErrorId : MethodNotFound&lt;/P&gt;&lt;P&gt;Method invocation failed because [NetApp.Ontapi.Filer.NaController] doesn't contain a method named 'op_Addition'.&lt;BR /&gt;At C:\Users\Richard\NewMirror2.ps1:16 char:1&lt;BR /&gt;+ $Dest = $DestFiler + ":" + $Vol&lt;BR /&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;+ CategoryInfo : InvalidOperation: (op_Addition:String) [], RuntimeException&lt;BR /&gt;+ FullyQualifiedErrorId : MethodNotFound&lt;/P&gt;&lt;P&gt;New-NaVol : Object reference not set to an instance of an object.&lt;BR /&gt;At C:\Users\Richard\NewMirror2.ps1:18 char:1&lt;BR /&gt;+ New-NaVol $Vol -Controller $DestFiler -Aggregate aggr0 -Size $Size -SpaceReserve ...&lt;BR /&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;+ CategoryInfo : InvalidOperation: (DC-XXX:NaController) [New-NaVol], NullReferenceException&lt;BR /&gt;+ FullyQualifiedErrorId : VolumeListInfoFailed,DataONTAP.PowerShell.SDK.Cmdlets.Volume.NewNaVol&lt;/P&gt;&lt;P&gt;Set-NaVol : Object reference not set to an instance of an object.&lt;BR /&gt;At C:\Users\Richard\NewMirror2.ps1:19 char:1&lt;BR /&gt;+ Set-NaVol -Name $Vol -Restricted -Controller $DestFiler&lt;BR /&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;+ CategoryInfo : InvalidOperation: (DC-XXX:NaController) [Set-NaVol], NullReferenceException&lt;BR /&gt;+ FullyQualifiedErrorId : VolumeListInfoFailed,DataONTAP.PowerShell.SDK.Cmdlets.Volume.SetNaVol&lt;/P&gt;&lt;P&gt;Invoke-NaSnapmirrorInitialize : Cannot bind argument to parameter 'Destination' because it is null.&lt;BR /&gt;At C:\Users\Richard\NewMirror2.ps1:22 char:45&lt;BR /&gt;+ Invoke-NaSnapmirrorInitialize -Destination $Dest -Source $Scr&lt;BR /&gt;+ ~~~~~&lt;BR /&gt;+ CategoryInfo : InvalidData&amp;amp;colon; (:) [Invoke-NaSnapmirrorInitialize], ParameterBindingValidationException&lt;BR /&gt;+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,DataONTAP.PowerShell.SDK.Cmdlets.Snapmirr&lt;BR /&gt;or.InvokeNaSnapmirrorInitialize&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:20:49 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/98800#M4097</guid>
      <dc:creator>rdenyer001</dc:creator>
      <dc:date>2025-06-05T05:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShelll Error: Method invocation failed because ....</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/98806#M4098</link>
      <description>&lt;P&gt;hi richard,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let's start from top - what are you expecting when doing this?&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; $Scr = $SrcFiler + ":" + $Vol ??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i don't have a clue&amp;nbsp; about this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;another thing what i remember to be heard is that you cannot have multiple controller connections at the same time - i think you have to connect to srcfiler first - create volume, set volume options and so on - and when you're done with the src - connect to the destination - create volume, set volume options, restrict volume and then initialize snapmirror - i think this should work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let me know you meant and i'll try to assist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks AJ&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jan 2015 11:07:45 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/98806#M4098</guid>
      <dc:creator>HONIG2012</dc:creator>
      <dc:date>2015-01-02T11:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShelll Error: Method invocation failed because ....</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/98811#M4099</link>
      <description>&lt;P&gt;Are you trying to do a one by one volume creation? &amp;nbsp;if so why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've used this is the past to create in bulk to mirror a setup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;$sfiler = read-host "Enter Source Filer"&lt;BR /&gt;$dfiler = read-host "Enter Destination Filer"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#Production Testing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;##Failover testing&lt;BR /&gt;$srcfiler= Connect-NaController $sfiler&lt;BR /&gt;$dstfiler= Connect-NaController $dfiler&lt;/P&gt;&lt;P&gt;#define aggr&lt;BR /&gt;$aggr = "aggr1"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;$vols = Get-NaVol -Controller $srcfiler&lt;/P&gt;&lt;P&gt;## Loop through existing vols&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;foreach ($vol in $vols) {&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;$volume = $vol.name&lt;BR /&gt;$size = $vol.totalsize&lt;BR /&gt;# Create new Volumes on Destination Filer&lt;BR /&gt;New-NaVol -Name $volume -Aggregate $aggr -SpaceReserve none -Size $size -Controller $dstfiler -confirm:$false&lt;BR /&gt;&lt;BR /&gt;#Set Volume Settings&lt;BR /&gt;Set-NaSnapshotReserve -TargetName $volume "0" -Controller $dstfiler&lt;BR /&gt;&lt;BR /&gt;#Prepare volume for Snapmirror - Restrict volume&lt;BR /&gt;Set-NaVol -Name $volume -restricted -Controller $dstfiler&lt;BR /&gt;&lt;BR /&gt;# Setup snapmirror up&lt;BR /&gt;Invoke-NaSnapmirrorInitialize -destination $dfiler":"$volume -Source $sfiler":"$volume -Controller $dstfiler&lt;/P&gt;&lt;P&gt;# Setup Snapmirror Schedule&lt;BR /&gt;Set-NaSnapmirrorSchedule -destination $dfiler":"$volume -Source $sfiler":"$volume -minutes "15" -hours "0-23/4" -daysofmonth * -daysofweek * -Controller $dstfiler&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That will setup the volumes on the new target controller, and start snapmirrors&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jan 2015 14:26:56 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/98811#M4099</guid>
      <dc:creator>JGPSHNTAP</dc:creator>
      <dc:date>2015-01-02T14:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShelll Error: Method invocation failed because ....</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/98816#M4100</link>
      <description>&lt;P&gt;&lt;SPAN&gt;$SrcFiler and&amp;nbsp;$DestFiler aren't strings like you are expecting - they are objects.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;use&amp;nbsp;$SrcFiler.name for the controller name (or maybe assign the filer name to a variable and use that in the connect-nacontroller command and also later on in the snapmirror initialize)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;connect-nacontroller $destination&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;invoke-snapmirror -destination $destination:$vol -source $source:$vol&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;m&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jan 2015 15:10:51 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/98816#M4100</guid>
      <dc:creator>markweber</dc:creator>
      <dc:date>2015-01-02T15:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShelll Error: Method invocation failed because ....</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/98831#M4101</link>
      <description>&lt;P&gt;Thanks &amp;nbsp;JGPSHNTAP&lt;SPAN class="login-bold"&gt;&amp;nbsp; I like this &amp;nbsp;will definitely &amp;nbsp; keep &amp;nbsp;it in my notes&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;Reason I am doing this voluem by volume is &amp;nbsp;that &amp;nbsp;the business does not want to move all the volumes &amp;nbsp;but also does not want to delete any of the old data that has been collected over the last 7 years, just yet &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This was my reasoning behind a script, as the IT &amp;nbsp;team could then decide which volumes to take to the new filer, and all they need to do was to enter the name of the volume and its size &amp;nbsp;and the &amp;nbsp;script &amp;nbsp;would do the rest.&lt;/P&gt;&lt;P&gt;Unfortunetaly &amp;nbsp;my&amp;nbsp;script writing ability &amp;nbsp; does not keep up with my ideas , that why &amp;nbsp;I use the &amp;nbsp;community .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your input &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2015 01:58:46 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/98831#M4101</guid>
      <dc:creator>rdenyer001</dc:creator>
      <dc:date>2015-01-05T01:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShelll Error: Method invocation failed because ....</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/98832#M4102</link>
      <description>&lt;P&gt;Thanks Mark&lt;/P&gt;&lt;P&gt;Will give this &amp;nbsp;a go&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2015 02:00:34 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/98832#M4102</guid>
      <dc:creator>rdenyer001</dc:creator>
      <dc:date>2015-01-05T02:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShelll Error: Method invocation failed because ....</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/98833#M4103</link>
      <description>&lt;P&gt;AJ,&lt;/P&gt;&lt;P&gt;wwhat I was trying to &amp;nbsp;get &amp;nbsp;was a varible string that &amp;nbsp; I could I could use in the command &amp;nbsp;&amp;nbsp;Invoke-NaSnapmirrorInitialize.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thansk for you interest &amp;nbsp;looks like the answer has been provied &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RD&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jan 2015 02:03:11 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/98833#M4103</guid>
      <dc:creator>rdenyer001</dc:creator>
      <dc:date>2015-01-05T02:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShelll Error: Method invocation failed because ....</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/102512#M4210</link>
      <description>&lt;P&gt;Hello RD,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I am working with NetApp for few years but I never had the chance to work on Powershell before. I had been trying to get started with NetApp Powershell module for few days. I am able to connect to filers individually and run few cmdlets. But if I am having issues in connecting to multiple filers at once and list system info by using foreach loop in my profile. But surprisingly the same profile is working fine at times. By saying working , I am not getting any output but it runs without throwing any errors. You can see the loop I am talking about below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;foreach ($filer in $allfilers){&lt;BR /&gt;#connect to the storage system&lt;BR /&gt;Connect-NaController $filer -Credential $authentication&lt;BR /&gt;echo "Connecting to $filer"&lt;/P&gt;&lt;P&gt;echo "--------------"$filer"-------------"&lt;BR /&gt;get-nasysteminfo&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the above loop, should I give a pause or anything in order to get the filer info? &amp;nbsp;You can see the errors which I am getting below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Connect-NaController : Object reference not set to an instance of an object.&lt;BR /&gt;At D:\Data\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:20 char:21&lt;BR /&gt;+ Connect-NaController &amp;lt;&amp;lt;&amp;lt;&amp;lt; $filer -Credential $authentication&lt;BR /&gt;+ CategoryInfo : InvalidResult: (filer1:NaController) [Connect-NaController], NullReferenceException&lt;BR /&gt;+ FullyQualifiedErrorId : HttpConnectionFailed,DataONTAP.PowerShell.SDK.ConnectNaController&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Get-NaSystemInfo : Value in $global:CurrentNaController is not of type NetApp.Ontapi.Filer.NaController&lt;BR /&gt;At D:\Data\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:23 char:17&lt;BR /&gt;+ get-nasysteminfo &amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;+ CategoryInfo : InvalidArgument: (:) [Get-NaSystemInfo], ArgumentException&lt;BR /&gt;+ FullyQualifiedErrorId : ControllerNotSpecified,DataONTAP.PowerShell.SDK.Cmdlets.System.GetNaSystemInfo&lt;/P&gt;&lt;P&gt;Connect-NaController : Object reference not set to an instance of an object.&lt;BR /&gt;At D:\Data\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:20 char:21&lt;BR /&gt;+ Connect-NaController &amp;lt;&amp;lt;&amp;lt;&amp;lt; $filer -Credential $authentication&lt;BR /&gt;+ CategoryInfo : InvalidResult: (filer2:NaController) [Connect-NaController], NullReferenceException&lt;BR /&gt;+ FullyQualifiedErrorId : HttpConnectionFailed,DataONTAP.PowerShell.SDK.ConnectNaController&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any information in this regard would be really helpfull. Thank you very much in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;MD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2015 19:15:11 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/102512#M4210</guid>
      <dc:creator>diwakar</dc:creator>
      <dc:date>2015-03-30T19:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: PowerShelll Error: Method invocation failed because ....</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/102554#M4211</link>
      <description>&lt;P&gt;Can you please start a new thread as its easier to monitor&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 11:40:43 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/PowerShelll-Error-Method-invocation-failed-because/m-p/102554#M4211</guid>
      <dc:creator>JGPSHNTAP</dc:creator>
      <dc:date>2015-03-31T11:40:43Z</dc:date>
    </item>
  </channel>
</rss>

