Page 1 of 1

NetApp DataONTAP Module

Posted: Wed Oct 09, 2019 6:28 am
by waynecierkowski
To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PowerShell Studio 2019 5.6.167.0
32 or 64 bit version of product: 64 bit
Operating system: Windows 10 Version 1809
32 or 64 bit OS: 64 Bit

I'm trying to get the NetApp PowerShell Toolkit imported into Powershell Studio. I checked the $env:PSModulePath and the location is included.
After verifying that the PSModulePath contained the location for the NetApp TooKit I did a Import-Module DataONTAP, it worked fine. But
I don't see the DataONTAP in the Object Browser.

How can I resolve this issue so I can use the NetApp toolkit in some Powershell programs?

Thanks,

Wayne


DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM

Re: NetApp DataONTAP Module

Posted: Wed Oct 09, 2019 6:40 am
by mxtrinidad
Thanks for reporting the issue.

Our team will be investigating and we'll get back to you soon.

Re: NetApp DataONTAP Module

Posted: Wed Oct 09, 2019 7:07 am
by mxtrinidad
Make sure that the module is "checked" in the "PowerShell Cache Editor". This will refresh the "Object Browser" list.
Cache_01_2019-10-09_10-03-46.png
Cache_01_2019-10-09_10-03-46.png (227.06 KiB) Viewed 803 times

Re: NetApp DataONTAP Module

Posted: Wed Oct 09, 2019 7:18 am
by waynecierkowski
I just looked at my Cache Editor and I do not see DataONTAP or any reference to NetApp in the list.

Let me just add this, when I downloaded the NetApp Powershell Tookit it came down as a MSI, installable. I ran the installer and was able to do a Import-module in a standalone PS Console window.

Even in Powershell Studio I'm able to reference the cmdlets in the Console window in PS Studio. But my compiled program I can't use them. Even if I do a Import-Module in the compiled program...

Thanks,

Wayne

Re: NetApp DataONTAP Module

Posted: Wed Oct 09, 2019 8:04 am
by brittneyr
Have you tried Reload All in the cache editor? If it appears, then build cache and reload from the ribbon:
SPS_Reload-Cache.png
SPS_Reload-Cache.png (29.3 KiB) Viewed 789 times
Do you know what version of PowerShell the module is built for? It may be appearing in a different version like PowerShell V2 or V3:
SPS_CacheEditorVersionReload.png
SPS_CacheEditorVersionReload.png (48.9 KiB) Viewed 789 times

Re: NetApp DataONTAP Module

Posted: Wed Oct 09, 2019 8:10 am
by waynecierkowski
OK Resolved the issue. Here is what I did.

Doing some googling I found a Best Practice Guide for the Toolkit. In that guide it talked about the install of the toolkit, I referenced the location it should be in as - C:\Program Files(x86)\NetApp\Data ONTAP PowerShell Toolkit\DataONTAP

Now mine was at this location - C:\Program Files(x86)\NetApp\Data ONTAP PowerShell Toolkit\Modules
Under Modules was folders for DataONTAP and NetApp.SANtricity.PowerShell.

I copied the DataONTAP folder so it would reside under 'Data ONTAP PowerShell Toolkit'.

I then had to adjust the $Env:PSModulePath for this new location. When I looked at the contents of this variable it had in it - D:\Users\Wayne Cierkowski\Documents\WindowsPowerShell\Modules;C:\Program Files (x86)\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\NetApp\NetApp PowerShell Toolkit\Modules\.

Now notice the "." after the \ I didn't add that... Not sure if that "." should be there or not.

I change the contents of the env variable to look like this - D:\Users\Wayne Cierkowski\Documents\WindowsPowerShell\Modules;C:\Program Files (x86)\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\NetApp\NetApp PowerShell Toolkit\DataONTAP

In Powershell Studio I went back into the Cache Editor and did a Import Module and drilled down to the location of the DataONTAP Module. All of a sudden DataONTAP appeared.

Now I can use the NetApp CmdLets in my programs...

Thanks,

Wayne

Re: NetApp DataONTAP Module

Posted: Wed Oct 09, 2019 8:39 am
by brittneyr
Happy to hear this has been resolved and thank you for posting the solution that worked for you. :D