Microsoft Virtualization Discussions

Add-NaCifsShare Bug?

JLundfelt

Trying to create some cifs shares for some VMWare NFS volumes, and am getting an error, only when I actualy run the comand. The -whatif works fine-

PS I:\> Get-NaVol VM* | foreach-object{Add-NaCifsShare $_.name /vol/$._name -whatif}

What if: Adding CIFS share VMDS_ARCHIVE.

What if: Adding CIFS share VMDS_D1.

What if: Adding CIFS share VMDS_D2.

What if: Adding CIFS share VMDS_D3.

What if: Adding CIFS share VMDS_D4.

PS I:\> Get-NaVol VM* | foreach-object{Add-NaCifsShare $_.name /vol/$._name}

Add-NaCifsShare : Could not find file 'C:\Users\jlundfelt\AppData\Local\Temp\0qbjxocu.dll'.

At line:1 char:47

+ Get-NaVol VM* | foreach-object{Add-NaCifsShare <<<<  $_.name /vol/$._name}

    + CategoryInfo          : InvalidOperation: (irv-san-na1.corp.com:NaController) [Add-NaCifsShare], FileNotFoundException

    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Cifs.AddNaCifsShare

Add-NaCifsShare : Could not find file 'C:\Users\jlundfelt\AppData\Local\Temp\jjlglfci.dll'.

At line:1 char:47

+ Get-NaVol VM* | foreach-object{Add-NaCifsShare <<<<  $_.name /vol/$._name}

    + CategoryInfo          : InvalidOperation: (irv-san-na1.corp.com:NaController) [Add-NaCifsShare], FileNotFoundException

    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Cifs.AddNaCifsShare

Add-NaCifsShare : Could not find file 'C:\Users\jlundfelt\AppData\Local\Temp\qqol64ld.dll'.

At line:1 char:47

+ Get-NaVol VM* | foreach-object{Add-NaCifsShare <<<<  $_.name /vol/$._name}

    + CategoryInfo          : InvalidOperation: (irv-san-na1.corp.com:NaController) [Add-NaCifsShare], FileNotFoundException

    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Cifs.AddNaCifsShare

Add-NaCifsShare : Could not find file 'C:\Users\jlundfelt\AppData\Local\Temp\9cpfup4c.dll'.

At line:1 char:47

+ Get-NaVol VM* | foreach-object{Add-NaCifsShare <<<<  $_.name /vol/$._name}

    + CategoryInfo          : InvalidOperation: (irv-san-na1.corp.com:NaController) [Add-NaCifsShare], FileNotFoundException

    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Cifs.AddNaCifsShare

Add-NaCifsShare : Could not find file 'C:\Users\jlundfelt\AppData\Local\Temp\4oqyok4n.dll'.

At line:1 char:47

+ Get-NaVol VM* | foreach-object{Add-NaCifsShare <<<<  $_.name /vol/$._name}

    + CategoryInfo          : InvalidOperation: (irv-san-na1.corp.com:NaController) [Add-NaCifsShare], FileNotFoundException

    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Cifs.AddNaCifsShare

Anyone else run into this? I'm gonna have to do it w/o powershell now

4 REPLIES 4

cknight

That looks like an issue with the just-in-time .NET serialization mechanism.  We know this happens if you load the DataONTAP module with the -Verbose switch, but that's not something we can fix.  Can you let us know which version of Windows, .NET, and the Toolkit you are using?

JLundfelt

Wow, you are fast!

OS Name    Microsoft Windows 7 Enterprise

Version    6.1.7601 Service Pack 1 Build 7601

As for .NET version(s) my HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup export shows-

Version="2.0.50727.5420"
Version="3.0.30729.5420"
Version="3.0.4506.5420"
Version="3.0.6920.5011"
Version="3.5.30729.5420"
Version="4.0.30319"

Data ONTAP PowerShell Toolkit, version 1.4.0.122.

Thanks!

-Jon

JLundfelt

I just installed 1.5, and this syntax worked-

get-navol vm* | foreach-object{Add-NaCifsShare $_.name /vol/$_}

Thanks for all the cool work w/ the toolkit, its awesome!

cknight

Excellent, thanks for that, Jon.  Glad you like the Toolkit.

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public