March 2018
Beginner
584 pages
14h 51m
English
In this example, we will create a logical switch using the HTTP POST REST API request via PowerShell:
# NSX Variables $NSXUsername = "admin" $NSXPassword = "VMware1!" $NSXManager = "https://nsxmgr-01a.corp.local" $NSXURI = "/api/2.0/vdn/scopes/vdnscope-1/virtualwires" # NSX Authorization Header $NSXAuth = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($NSXUsername + ":" + $NSXPassword)) $NSXAuthHeader = @{"Authorization"="Basic $NSXAuth"} # NSX XML Payload [xml]$XMLBody = "<virtualWireCreateSpec> <name>PowerShell-Logical-Switch</name> <description>Logical Switch ...Read now
Unlock full access