搜尋此網誌

2017/3/15

[powershell]如何使用powershell ise來編輯vmware powercli

1、開啟PowerShell ISE

2、執行下面語法:
New-Item -Path $Profile -ItemType file -Force
notepad $profile

3、將下面的值填入記事本內:
& 'C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1'
不過我的路徑是
C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1
跟官方給的路徑不一樣,所以使用前要確認

最後重啟powershell ise就完成了

參考資料
http://www.virten.net/2016/07/how-to-properly-initialize-powercli-6-x-in-powershell-ise/

沒有留言: