Problem with Remove-VDSwitchVMHost
Hi guys,.
First of all... Here's the PowerCLI version I use:
PowerCLI Version
----------------
VMware vSphere PowerCLI 5.1 Release 2 build 1012425
---------------
Versions of the snap
---------------
VMWare AutoDeploy PowerCLI component 5.1 build 768137
VMWare ImageBuilder PowerCLI component 5.1 build 768137
License of VMware PowerCLI component 5.1 build 669840
VDS's VMware PowerCLI component 5.1 build 1012428
VMware vSphere PowerCLI component 5.1 build 1012428
I'm having a problem with Remove-VDSwitchVMHost which is a bit frustrating. I have a script that I use to rebuild hosts in my environment when we upgrade versions. I recently changed my vDS switches. When the host is rebuilt, there is a phantom entry in the vDS for the old server. For some reason, I can't remove it with Remove-VDSwitchVMHost.
The two hosts in this group appear in the GUI. Esxt21 is the server, I just rebuilt and added to the vCenter.
When you go through PowerCLI, it presents different information:
When I get home: get-vmhost $vmhost | Get-VDSwitch nothing is returned. If I list the switch first, then get-vmhost, it shows data:
Get-VDSwitch $vDSName | get-vmhost $vmhost | Delete-VDSwitchVMHost does not seem to work either.
I can delete the host via the interface graphics, but which goes against the idea of a script
Someone had a bit of luck with this?
Thank you
Dan
Got, it works now! Here's the code to work:
$vmhost = "myhostname".
$vDSName = "myvdsname".
$vmhostid = (get-vmhost $vmhost) .extensiondata. Moref.Value
$vDS = (get-VDSwitch $vDSName)
$vDSView = get-view-Id $vDS.id
$vDSView.UpdateViewData)
# - ReconfigureDvs_Task -
$spec = new-Object VMware.Vim.DVSConfigSpec
$spec.configVersion = $vDSView.Config.ConfigVersion
$spec.host = new-Object VMware.Vim.DistributedVirtualSwitchHostMemberConfigSpec [] (1)
$spec.host [0] = new-Object VMware.Vim.DistributedVirtualSwitchHostMemberConfigSpec
$spec.host [0] .operation = 'delete '.
$spec.host [0] .host = new-Object VMware.Vim.ManagedObjectReference
$spec.host [0].host.type = "HostSystem.
$spec.host [0] .host. Value = $vmhostid
_this $ get-view-Id = $vDS.id
_this $. ReconfigureDvs_Task ($spec)
Thanks for your help!
Tags: VMware
Similar Questions
-
I use LR CC on MAC OS-problem with removal of Spot, it is note all points but does not change things?
Hi bakhytz,
Could you please check if the opacity is set to the maximum value and feather is set to a lower value in your spotting tool parameters.
-
Problem with removal of duplicates in Windows Search.
I have a large collection of files and a lot of them are duplicates with different things on the end as (F) or (G), so I use windows search to find each other and then select all, then delete them so I have all these duplicates. the problem is when I'm looking for (F) for example, it shows the files with (F), but it also shows files with just a f in the name, but not the parentheses. Why is this happening?
It works like a web search engine. Bing and Google did the same thing when you perform a search.
To search for a specific string, including punctuation, you can type it like this:
= filename: "(F) '"
I test here, and even if both files have 'F' in the name, the search results return only the one with the (F):
Don't forget that my test is Windows 8, but the Foundation research is still the same under Windows 7 and Vista, so it should always work.
-
I have a problem with removing programs from the childs account.
Original title: how to remove programs from my childs account? He said that you are not allowed (as it should), but does not other options.
I was cleaning my sons account and could not uninstall or remove most of the things.
Its been a problem since I bought this new computer. Some programs such as Adobe Flash, Chrome, etc. installed on my account, but not on other accounts. They must be installed on each user account if they choose to use ie: Chrome, Adobe, Java etc.When Adobe Flash is installed for IE it is installed only on the user account that is not installed on the computer. So basically 3 accounts 3 downloads.Makes no sense. However, some programs install to all accounts.When I uninstall a program from an admin account it does uninstall not other accounts 2 user.Logging into his account, I can't remove or uninstall. I don't really want to delete the entire account.How can I accomplish this?Thanks, DenisePrograms may vary in how they handle the installation and the removal of several accounts.
I suggest to uninstall those that are a problem, temporarily change the account of the child to the administrator, connect you and make uninstalling and then change it back. Not an elegant solution, but it should work. -
Problem with remove the child to
I have an empty clip that contains text and media for executives in a lesson called content_mc
I load dynamically in a text box and then other things such as graphics, videos and other swf files...
before you begin to insert swf files, it worked very well, but it was just the text on the screen, now that I have other media, it removes "randomly" children and I can't understand why it's what I use:
for (var c:uint = 0; c < content_mc.numChildren; c ++) {}
trace (c + ":" + content_mc.getChildAt (c) .name);
content_mc.removeChildAt (c);
}
Anyone know what is happening?Figured it out!
OK, for those of you who want the answer to this, but don't want to pay for it...
I realized that when you use the removeChildAt() she removes the child of the index number... so the way I did it was like this:
for (var c:uint = 0; c
trace ("-" + content_mc.getChildAt (c) .name + "(" + c + "')");
content_mc.removeChildAt (c);doing this, he was first to remove the child at index 0. and what made flash NOW are "slides" down an index... so the element that was at index 1 is now 0, the element at index 2 is now 1, etc... so when I arrived at the last, it would not remove it because it was no longer there...
but change to it (instead of using the variable c, you have just put 0 in the index box):
for (var c:uint = 0; c
trace ("-" + content_mc.getChildAt (0) .name + "(" + c + "')");
content_mc.removeChildAt (0);solved the problem :)
-
Wonder if someone had a problem with removal of Sweetpacks?
I tried an antivirus software, including MalwareBytes, Spybot & MS, but none have identified it, a fortiori removed. It is very invasive and annoying - someone ' a has any suggestions?
-
Problems with aero after the latest updates
Hello
Someone had a problem with the latest Microsoft security updates
touching the aero desktop theme.Since I downloaded the updates my aero as a theme stopped working.
I did a roll windows back but I still have the same problems.The updates are #KB971029 and #KB971029 the
updates have been downloaded on 03/17/11I hope someone can help with this problem.
All the best
Philip Davies
Hello
OK try to remove these updates to see if that helps. Sometimes manually
install the updates one at a time will prevent topics such as this one (if the)
mises_a_jour have been the question).Control Panel - Windows Updates - lower left Installed Updates - uninstall or change
Or
Remove an update
http://Windows.Microsoft.com/en-us/Windows-Vista/remove-an-updateOr
The problems with the removal of updates
http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-removing-updatesOr
How to uninstall updates in Windows Vista
http://www.vista4beginners.com/how-to-uninstall-Windows-Vista-updatesDisable or hide optional updates on Windows Vista
http://www.howtogeek.com/HOWTO/Windows-Vista/disable-or-hide-optional-updates-on-Windows-Vista/AFTER removal of updates, do a system restore to before
updates have been applied to the origin. Therefore, affect the total amount of
updates are deleted.How to make a Vista system restore
http://www.Vistax64.com/tutorials/76905-System-Restore-how.html
=======================================================If necessary:
Follow these steps to remove corruption and missing/damaged file system repair or replacement.
Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup
Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN
sfc/scannow
How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
generates in Windows Vista cbs.log
http://support.Microsoft.com/kb/928228Then, run checkdisk - schedule it to run at next boot, then apply OK your way out, then restart.
How to run the check disk at startup in Vista
http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html======================================================
If necessary try a repair Installation which allows to keep the programs and data however
redundant backups are always a good idea.You can use another DVD that aren't copy protected but you you need to own
Product key. It must be the same version 32 or 64 BIT Vista OEM. Also the system
machine to usually sell the cheap disk since you already own Windows. Don't forget to make a
good backup or 3 (security in redundancy).On-site upgrade
http://vistasupport.MVPs.org/repair_a_vista_installation_using_the_upgrade_option_of_the_vista_dvd.htmThis tells you how to access the System Recovery Options and/or a Vista DVD
http://Windows.Microsoft.com/en-us/Windows-Vista/what-happened-to-the-recovery-consoleHow to perform a repair for Vista Installation
http://www.Vistax64.com/tutorials/88236-repair-install-Vista.htmlI hope this helps.
-
I want to download free applications, but it doesn't let me do it cause I have a problem with my payment, I try to remove my debit card and the option did not appear, I can't choose no for the payment, what can I do? This happen after I bought some coins for a game
You must settle the debt until you can download something else of the podcast episodes on the iTunes Store or select None as the payment option.
(142394)
-
I had a problem with slow, so I used "reset". The popup ran forever so I stopped it. Now I can not use, remove or add the program. How should I proceed?
TIA,
BWSwedeTry to create a new profile.
See "create a profile":
- https://support.Mozilla.org/KB/Profile-Manager-create-and-remove-Firefox-profiles
- http://KB.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues
If the new profile works then you can transfer files from a profile in the new profile, but make sure not to copy corrupted files.
- http://KB.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
- https://support.Mozilla.org/KB/recovering+important+data+from+an+old+profile
What problems do you have that you want to reset Firefox?
Firefox creates a new folder of old data of Firefox on the desktop?
If reset you Firefox and a new profile is created and some of your data (bookmarks, passwords, cookies, form data) is automatically imported and your current profile will be moved on the desktop (old data of Firefox).
-
I had problems with Firefox 4.0 locked pretty much since I installed it. I have add a few Add-ons and all I can think to do is to remove them. I can't figure how to get rid of them.
On the left side of the window, did you go to the bottom of the list "Extension"? The other.
-
There is a problem with my payment information and I can't configure any application I want to remove my information from my icloud account payment
There are no withdrawal, must be replaced and released.
-
Problems with the removal of password for stsrting upward
problems with the removal of password
Hello
We can not help you with passwords in BIOS.
You will need to contact the manufacturer.
@@@@@@@@@@@@@@@@@@@@
If it is the password of the user account, read this:
"How to delete or change a password for a user account in Vista"
http://www.Vistax64.com/tutorials/101986-user-account-remove-password.html
See you soon.
-
Problem with Windows Update after the removal of Virus
My operating system is Win Vista 32 bit, had some virus closed my windows updates, have a view of the white page. Checked that my services and win update is in automatic mode has started, so I don't know why my updater gives me a red x saying windows updater is turned off. Any suggestions?
[Original title: Windows Update]
It makes more sense. How to reset the Windows Update components?
Yet, as indicated in The ball , the search results links do not work. I also used several browsers and DuckDuckGo. Maybe it's because the Windows Update Agent was changed some time ago and the article is no longer valid.
EDIT: If the OP is also struggling to access the link I suggest using repair Windows updates available from tweaking.com. I suggest also using the Registry backup of the same author before hand.
Repair the Windows updates
http://www.tweaking.com/content/page/repair_windows_updates.html
Registry backup
http://www.tweaking.com/content/page/registry_backup.htmlI hope this helps.
-
I had to restore my computer from these problems, had problems with wire4less router cause took off so wireless cause I got no internet. Has worked with the provider, Charter and got back internet but do not add or remove programs - have problem with printer HP TrayApp, s if lack but cfan can't add restricted cause - restricted user-entered and gave access, but still does not work. Will try F8 and start the repair to see if it works. Any ideas? HELP... l.Thanks
Thanjs - I did take it to someone to clean. Always have problemd with printer but am back to him. Thanks for all your suggestions. I guess I've done too many bugs diffedrent and messed up.
-
Vista Home premium
64 bit
HP pavilion dv4-1220us
It happens when I went to open I tunes and he indicated a problem with the cd/dvd and then I noticed security remove the icon at the bottom of the screen, attended safe remove and it delete my CD-ROM drive mounted cd/dvd look no further and I notice this driver is part of apple who was a pilot of speed indicating this driver will remove your drive of cd/dvd rom IS NOT WORKING WITH some programs installed. I contacted apple, we have deleted the driver and complete the process with the driver of the machine. Now, this does not take care of the security delete icon then tech apple tried to help and communicate with Microsoft or hp.
RESTORE MY COMPUTER SEVERAL TIMES, THIS ICON IS STILL THERE.
DOWN MY BIOS AND THE ICON IS STILL THERE.
THIS SCANNER DRIVER AND THE ICON IS STILL THERE.
Security delete icon States: remove TSST CORP CD/DVD TS-L633L ATA DEVICE READERS of CD-ROM/DVD-ROM if I hit remove it will remove my CD/DVD-ROM DRIVE.
I went on my computer and click on my cd/dvd rom drive and went to properties and that's what I found below.
1. FUJITSU MHZ2250BH G2 ATA HARD DRIVE: WENT INTO PROPERTIES TO DISPLAY DRIVERS, IT HAS A HPDSKLFT. SYS DID NOT SIGN THE OTHER TWO DRIVERS ARE THE SIGN. ENTERED DRIVERS FILE AND INSTALLED THE SIGN AND IT IS SHOWING NO SIGN, ALSO WITH HP ASSIST THIS HARD DRIVE IS DISPLAYED AS 0 FAILURE AND DISK.
2 TSST CORP CD/DVD TS - L633L ATA DEVICE DVD/CD-ROM: ENTERED VIEW PROPERTIES PILOTS AND THIS ONE HAS THE DRIVER OF THE VEHICLE AND A DRIVER.
At the moment I'd hide so I does not uninstall my cd/dvd drive.
Do I need another hard drive?
Is this something with the Bios?
Apple has tried to help with this driver of train that I'm not sure that this problem is still with this gear or what? This is the site about the problem to apple and the site of heavy plant driver.
http://www.GearSoftware.com/support/drivers.php
http://www.GearSoftware.com/wiki/index.php?title=CD/DVD_drives_disappear_after_installing_iTunes
http://support.Apple.com/kb/TS2308
Hi Mamalasting,
I'd say Hewlett-Packard to visit support website and check if they have the latest drivers for the DVD player.
Reference:
Thank you, and in what concerns:
I. Suuresh Kumar - Microsoft technical support.Visit our Microsoft answers feedback Forum and let us know what you think.
Maybe you are looking for
-
response to screen iPhone touchscreen 6
Hello First of all, I would like to welcome all users in Apple Support Comunity and I hope I help other users with their problems. But to the point. I m wondering how to make my iPhone more responsible 6 Touch then it is now. Problem is I broke my sc
-
I want Windows 7 return on my Compaq Presario CQ61-312SA!
I stupidly deleted all partitions on my hard drive, I never created a restore image for my laptop pre-installed Windows 7. I installed Windows XP and I want my Windows 7 32 bit back! I contacted Microsoft and they suggest I have contact the producer
-
Y40 hibernation without giving low battery notification
I bought laptop 1 year ago. Recently I clean installed windows on my lenovo Y40 10. Laptop will now put into hibernation when the battery reaches 30% without first informing! All my drivers are up to date. I fade this problem what should I do? pls he
-
PCI-6224-88302 during the self-test error code
Hello I'm having a problem with the auto test my card PCI-6224 in my computer. I am able to run 2 different tables successfully on 2 different computers, but this computer is that it seems to give me trouble. When I open NI MAX to run the test, it gi
-
I can't open anything that uses Windows Explorer...
I just installed Office 2007 and now I can't open anything that uses Windows Explorer. This includes the trash, all files and folders, same control panel. The only things I seem to be able to run correctly are programs. When I try to open anything, I