Application Integration
1752777 Members
6409 Online
108789 Solutions
New Discussion юеВ

Re: Powershell - New-NSVolume does not work

 
SOLVED
Go to solution
jrich52352
Trusted Contributor

Re: Powershell - New-NSVolume does not work

Close powershell, delete the module file, download v2, DO NOT run the

install, just open ps and import it

Terry Zolinski
Advisor

Re: Powershell - New-NSVolume does not work

The reason I ran the installer is because this is the error I got when I just imported the module:

PS C:\Users\terry> New-NSClone

New-NSClone : Unable to find type [snap]. Make sure that the assembly that contains this type is loaded.

At line:1 char:1

+ New-NSClone

+ ~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (snap:TypeName) [], RuntimeException

    + FullyQualifiedErrorId : TypeNotFound

jrich52352
Trusted Contributor

Re: Powershell - New-NSVolume does not work

Did you unblock the zip after downloading?

Terry Zolinski
Advisor

Re: Powershell - New-NSVolume does not work

It wasn't blocked. I just downloaded V2 again and it's not blocked.

jrich52352
Trusted Contributor

Re: Powershell - New-NSVolume does not work

If you run the install it will grab v1 and overwrite what you downloaded.

Terry Zolinski
Advisor

Re: Powershell - New-NSVolume does not work

I just downloaded V2 again from the site. Was not blocked. Extracted, cleared out my powershell directory, copied these in, did not run install.ps1:

PS C:\Users\terry> $snap = Get-NSSnapShot | where {($_.name -match "test")}

Get-NSSnapShot : Unable to find type [snap]. Make sure that the assembly that contains this type is loaded.

At line:1 char:9

+ $snap = Get-NSSnapShot | where {($_.name -match "test")}

+         ~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (snap:TypeName) [], RuntimeException

    + FullyQualifiedErrorId : TypeNotFound

jrich52352
Trusted Contributor

Re: Powershell - New-NSVolume does not work

Interesting, im fairly certain it should be

give me a little bit, i'll review and push an update.

On Tue, May 26, 2015 at 12:27 PM, terryzolinski <connect@nimblestorage.com>

jrich52352
Trusted Contributor

Re: Powershell - New-NSVolume does not work

So i just pushed a new snap.ps1 file that updates the namespace. The old dll didnt have a namespace so references were jsut like new-object vol.. which, could be a problem.. so i added namespace to the new dll, so its more like, new-object nimble.vol

I thought all of those had been fixed and pushed, but apparently not.

also i find it odd that the DLL commit/date make it seem like thats the old DLL.. clearly not the case if its requiring the Nimble namespace addition

Terry Zolinski
Advisor

Re: Powershell - New-NSVolume does not work

Downloaded the new zip, it wasn't blocked. Still erroring on assembly

PS C:\Users\terry> Get-NSSnapShot

Get-NSSnapShot : Unable to find type [snap]. Make sure that the assembly that contains this type is loaded.

At line:1 char:1

+ Get-NSSnapShot

+ ~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (snap:TypeName) [], RuntimeException

    + FullyQualifiedErrorId : TypeNotFound

Terry Zolinski
Advisor

Re: Powershell - New-NSVolume does not work

So, I've determined that my issues were related to the specific build of the Nimble OS we were running. At the time this did not work we were running 2.2.5.0-197583-opt. Now we are on 2.2.8-252438-opt and this works as expected, no errors on assembly.