NetApp DataONTAP Module

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
waynecierkowski
Posts: 23
Joined: Wed May 14, 2014 11:40 am

NetApp DataONTAP Module

Post by waynecierkowski » Wed Oct 09, 2019 6:28 am

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

User avatar
mxtrinidad
Site Admin
Posts: 354
Joined: Sun Mar 03, 2013 12:42 pm

Re: NetApp DataONTAP Module

Post by mxtrinidad » Wed Oct 09, 2019 6:40 am

Thanks for reporting the issue.

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

User avatar
mxtrinidad
Site Admin
Posts: 354
Joined: Sun Mar 03, 2013 12:42 pm

Re: NetApp DataONTAP Module

Post by mxtrinidad » Wed Oct 09, 2019 7:07 am

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 252 times

User avatar
waynecierkowski
Posts: 23
Joined: Wed May 14, 2014 11:40 am

Re: NetApp DataONTAP Module

Post by waynecierkowski » Wed Oct 09, 2019 7:18 am

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

User avatar
brittneyr
Site Admin
Posts: 187
Joined: Thu Jun 01, 2017 7:20 am

Re: NetApp DataONTAP Module

Post by brittneyr » Wed Oct 09, 2019 8:04 am

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 238 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 238 times
Brittney Ryn
SAPIEN Technologies, Inc.

User avatar
waynecierkowski
Posts: 23
Joined: Wed May 14, 2014 11:40 am

Re: NetApp DataONTAP Module

Post by waynecierkowski » Wed Oct 09, 2019 8:10 am

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

User avatar
brittneyr
Site Admin
Posts: 187
Joined: Thu Jun 01, 2017 7:20 am

Re: NetApp DataONTAP Module

Post by brittneyr » Wed Oct 09, 2019 8:39 am

Happy to hear this has been resolved and thank you for posting the solution that worked for you. :D
Brittney Ryn
SAPIEN Technologies, Inc.