Closed CernSteve closed 5 years ago
Hi Steve,
Yes, it is not possible for the moment... but you can try this (not tested..)
$ls = Get-NsxTransportZone | Get-NsxLogicalSwitch MyLogicalSwitch
$ls.name = "new name"
$uri = "/api/2.0/vdn/virtualwires/$($ls.ObjectId)"
Invoke-NSXWebRequest -method "put" -uri $uri -body $ls.OuterXml
Thanks for the update we'll give that a shot.
working ?
Fixed a typo on -body (need to use XML output...)
Thanks for the update! We are in the process of testing here in a week or two. I'll let you know what we run into.
Sorry for the delay in our response. However, the script worked really well. I used this code in a larger script that loaded a csv file with the old names and new names and was able to do a mass rename without issues.
@justinmossb Thanks for feedback
the next release with be include a Set-NsxLogicalSwitch (See #587)
I may be missing it but we need need to mass re-name Logical Switches. I see how to get, remove, and create but not modify. Any thoughts?