I am a huge VS Code user, all I do is run my scripts/codes for local/remote/cloud products within VS Code.
So I am now trying to get it so I can compile and run Nutanix Cmdlets within VS Code. I am trying to find the neatest, safest and most maintainable way possible without putting at risk the core of PowerShell.
I've only found one post where someone has mentioned doing this and it was by installing the Nutanix Cmdlets and copying the contents of the module's folder into "C:\Windows\System32\WindowsPowerShell\v1.0\Modules". Maybe possible but there are over 200 items that would need copying into the root of this folder, seems messy to me.
Can a sub folder called Nutanix be created for the contents to be copied too? Is there a better way to achieving what I feel be a great tool for all?
Advice/support much appreciated 🤓
Solved
Using Visual Studio Code with Nutanix Cmdlets
Best answer by andymlloyd
Hi James,
Just do the following:
This assumes you have already downloaded and installed the Nutanix Cmdlets from Prism.
Enjoy!
Just do the following:
- Open VSCode (as Admin)
- Then Run . "C:\Program Files (x86)\Nutanix Inc\NutanixCmdlets\powershell\import_modules\ImportModules.PS1"
- Then Add-PSSnapin nutanixcmdletspssnapin
This assumes you have already downloaded and installed the Nutanix Cmdlets from Prism.
Enjoy!
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
