3 Star 0 Fork 0

mirrors_vmware-archive/powernsx

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
VSCodeDebug.ps1 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
Nick Bradford 提交于 2016-11-02 16:18 . Initial version of copy-nsxedge
# Test harness to test modifications to PowerNSX module in vscode debugger.
# 1) Make sure https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell is installed in VSCode
# 2) Modify this script to perform functions required to exercise your code.
# 3) Set any breakpoints you need in PowerNSX module
# 4) Run a normal PowerShell debug session on this script
# Note: For some reason, you have to set a breakpoint on the last line of this script for all output to be shown in the debug output window.
#Make sure the user here knows we are doing something a bit dodgy
write-warning "Debug harness .VSCodeDebug.ps1 running. Modify this file to exec PowerNSX functions you wish to debug."
# Import the module from the current dir (presumably the one you are modifying)
import-module .\PowerNsx.psd1
# Connect to NSX server - change as appopriate.
connect-nsxserver nsx-m-01a-local -username admin -password VMware1! -viusername administrator@vsphere.local -vipassword VMware1!
# Do something there to call the PowerNSX function you are testing.
Get-NsxEdge | Copy-NsxEdge -Name TestEdge -Password VMware1!VMware1!
# We need a breakpoint here... see note above...
write-host "Finished"
write-host "You must set a breakpoint on me or you will lose output, And, I wont be seen!"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_vmware-archive/powernsx.git
git@gitee.com:mirrors_vmware-archive/powernsx.git
mirrors_vmware-archive
powernsx
powernsx
master

搜索帮助