Join us for a virtual Nutanix User Group meeting with Jarian Gibson as he covers Nutanix Cloud Clusters (NC2) on Azure and AWS with Citrix. <\/span><\/p>

Jarian will take a deep dive into NC2 on Azure architecture and Citrix on NC2 on Azure\u00a0that helps you strengthen your business continuity and disaster recovery position. He\u2019ll also provide the latest updates for NC2 on AWS.<\/span><\/p>

Plus, we're\u00a0giving away a Nutanix suitcase to one lucky winner!\u00a0Opt-in when you register\u00a0to be entered to win.\u00a0<\/p>","author":{"id":113632,"url":"\/members\/karlie-beil-113632","name":"Karlie Beil","avatar":"https:\/\/uploads-us-west-2.insided.com\/nutanix-us\/icon\/200x200\/1581aab3-bcf6-49f4-b2fb-3d11e8c010dc.png","userTitle":"Community Manager","rank":{"isBold":false,"isItalic":false,"isUnderline":false,"name":"Community Manager","color":"#0873ba"},"userLevel":4},"type":"Webinar","url":"https:\/\/next.nutanix.com\/events\/global-nug-nc2-on-azure-and-aws-with-citrix-151","image":"https:\/\/uploads-us-west-2.insided.com\/nutanix-us\/attachment\/f9693b5b-436b-427a-9b98-531b4040ff24_thumb.png","location":"","startsAt":1678298400,"endsAt":1678302000,"contentType":"event","attendees":[],"attendeeCount":0,"isLoggedInUserAttendee":false,"createdAt":"1675974969"},"phrases":{"Forum":{"{n} year|{n} years":"{n} year|{n} years","{n} month|{n} months":"{n} month|{n} months","{n} day|{n} days":"{n} day|{n} days","{n} hour|{n} hours":"{n} hour|{n} hours","{n} minute|{n} minutes":"{n} minute|{n} minutes","just":"just now","{plural} ago":"{plural} ago"}}}">

解决了

使用nutanix cmdlet使用Visual Studio代码


我是一个巨大的VS代码用户,我要做的就是在VS代码中运行我的脚本/代码。



因此,我现在正在尝试获取它,以便我可以在VS代码中编译并运行Nutanix CMDLET。我试图找到最整洁,最安全,最可维护的方式,而不会冒险成为PowerShell的核心。



我只找到了有人提到这样做的一篇文章,它是通过安装nutanix cmdlet并将模块文件夹的内容复制到“ c:\ windows \ system32 \ windowspowershell \ v1.0 \模块”中。也许可能,但是有200多个需要复制到该文件夹​​的根目录中的项目,对我来说似乎很混乱。



也可以创建一个称为Nutanix的子文件夹,也可以复制内容吗?有没有更好的方法来实现我觉得成为所有人的绝佳工具?



建议/支持非常感谢
图标

最好的答案Andymlloyd2019年8月14日,13:32

\n
\nJust do the following:
\n
\n
    \n
  1. Open VSCode (as Admin) \n
  2. Then Run . \"C:\\Program Files (x86)\\Nutanix Inc\\NutanixCmdlets\\powershell\\import_modules\\ImportModules.PS1\"<\/b> \n
  3. Then Add-PSSnapin nutanixcmdletspssnapin<\/b> \n<\/ol>\nThen all the cmdlets are available
    \n
    \nThis assumes you have already downloaded and installed the Nutanix Cmdlets from Prism.
    \n
    \nEnjoy!","className":"post__content__best_answer"}">
查看原件

该主题已关闭以供评论

2个答复

UserLevel 2
徽章 +2
嗨,詹姆斯,



只需以下操作:




  1. 开放VSCODE(作为管理员)
  2. 然后运行。“ c:\ program文件(x86)\ nutanix inc \ nutanixcmdlets \ powershell \ import_modules \ importmodules.ps1”
  3. 然后添加PSSNAPIN NUTANIXCMDLETSPSSNAPIN

然后所有的cmdlet都可用



假设您已经从Prism下载并安装了Nutanix cmdlet。



享受!
UserLevel 7
徽章 +34
你好 @jamescook



你看到的答复了吗 @andymlloyd



如果有帮助,请考虑单击“喜欢”和“最佳答案”链接,因为这将帮助社区中的其他人找到答案 - 谢谢
Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.<\/a>","cookiepolicy.modal.level1":"Basic
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">
Baidu