Solved Uninstalling Programs (Windows 10) Using Powershell
-
Try this instead:
(Get-WmiObject -Class Win32_Product -Filter "Name='Oracle VM VirtualBox'" -ComputerName . ).Uninstall()
-
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
-
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
-
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."
To uninstall something managed with Chocolatey you just do...
choco uninstall packagename
-
Remember, Chocolatey brings simple package management to Windows via repos the way that all of the non-Windows world has worked for decades. None of that bizarre, complicated need to script basic tasks, it's just a trivial command away to install, update, uninstall, etc.
-
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."
To uninstall something managed with Chocolatey you just do...
choco uninstall packagename
That would make a whole lot of sense.
-
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Remember, Chocolatey brings simple package management to Windows via repos the way that all of the non-Windows world has worked for decades. None of that bizarre, complicated need to script basic tasks, it's just a trivial command away to install, update, uninstall, etc.
And now that you say something I remember there being a time I had to unistall... I over complicated that.
-
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."
Actually, no. It is almost always there for windows to see. Because most chocolatey installs actually use the default windows installer. Just with a /silent switch (or whatever is appropriate).
-
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."
Actually, no. It is almost always there for windows to see. Because most chocolatey installs actually use the default windows installer. Just with a /silent switch (or whatever is appropriate).
Oh, I thought it never did that. I must have just worked with a few that didn't.
-
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."
Actually, no. It is almost always there for windows to see. Because most chocolatey installs actually use the default windows installer. Just with a /silent switch (or whatever is appropriate).
Oh, I thought it never did that. I must have just worked with a few that didn't.
Chocolatey does not put anything in there. But since most packages are just using the normal installer in silent mode, it is generally there.
-
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."
Actually, no. It is almost always there for windows to see. Because most chocolatey installs actually use the default windows installer. Just with a /silent switch (or whatever is appropriate).
Oh, I thought it never did that. I must have just worked with a few that didn't.
Chocolatey does not put anything in there. But since most packages are just using the normal installer in silent mode, it is generally there.
Makes sense.
-
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."
Actually, no. It is almost always there for windows to see. Because most chocolatey installs actually use the default windows installer. Just with a /silent switch (or whatever is appropriate).
Oh, I thought it never did that. I must have just worked with a few that didn't.
Chocolatey does not put anything in there. But since most packages are just using the normal installer in silent mode, it is generally there.
Makes sense.
It's like that with every package I've installed. One example is salt minion. If you install that with chocolatey, then uninstall it via Windows control panel, then try installing it again with Chocolatey, Chocolatey thinks it's still installed because doing it through Windows never tells Chocolatey it was installed. You have to use the force switch to install it again with Chocolatey.
The same goes for all Chocolatey packages I've used... 7zip, Firefox, Chrome, etc.
-
@obsolesce said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."
Actually, no. It is almost always there for windows to see. Because most chocolatey installs actually use the default windows installer. Just with a /silent switch (or whatever is appropriate).
Oh, I thought it never did that. I must have just worked with a few that didn't.
Chocolatey does not put anything in there. But since most packages are just using the normal installer in silent mode, it is generally there.
Makes sense.
It's like that with every package I've installed. One example is salt minion. If you install that with chocolatey, then uninstall it via Windows control panel, then try installing it again with Chocolatey, Chocolatey thinks it's still installed because doing it through Windows never tells Chocolatey it was installed. You have to use the force switch to install it again with Chocolatey.
The same goes for all Chocolatey packages I've used... 7zip, Firefox, Chrome, etc.
A bit like deleting files and then the RPM database has no idea what has happened.
-
@obsolesce said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."
Actually, no. It is almost always there for windows to see. Because most chocolatey installs actually use the default windows installer. Just with a /silent switch (or whatever is appropriate).
Oh, I thought it never did that. I must have just worked with a few that didn't.
Chocolatey does not put anything in there. But since most packages are just using the normal installer in silent mode, it is generally there.
Makes sense.
It's like that with every package I've installed. One example is salt minion. If you install that with chocolatey, then uninstall it via Windows control panel, then try installing it again with Chocolatey, Chocolatey thinks it's still installed because doing it through Windows never tells Chocolatey it was installed. You have to use the force switch to install it again with Chocolatey.
The same goes for all Chocolatey packages I've used... 7zip, Firefox, Chrome, etc.
We would have to purchase Pro or Business license for Chocolatey in order for it to know if packages was removed.
Package Synchronizer - Automatic Sync - keep installed packages synced up with software they are tracking when upgrades and uninstalls are performed outside of Chocolatey!
-
@black3dynamite said in Uninstalling Programs (Windows 10) Using Powershell:
@obsolesce said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."
Actually, no. It is almost always there for windows to see. Because most chocolatey installs actually use the default windows installer. Just with a /silent switch (or whatever is appropriate).
Oh, I thought it never did that. I must have just worked with a few that didn't.
Chocolatey does not put anything in there. But since most packages are just using the normal installer in silent mode, it is generally there.
Makes sense.
It's like that with every package I've installed. One example is salt minion. If you install that with chocolatey, then uninstall it via Windows control panel, then try installing it again with Chocolatey, Chocolatey thinks it's still installed because doing it through Windows never tells Chocolatey it was installed. You have to use the force switch to install it again with Chocolatey.
The same goes for all Chocolatey packages I've used... 7zip, Firefox, Chrome, etc.
We would have to purchase Pro or Business license for Chocolatey in order for it to know if packages was removed.
Package Synchronizer - Automatic Sync - keep installed packages synced up with software they are tracking when upgrades and uninstalls are performed outside of Chocolatey!
That would be handy. Do they have a trial for testing?
-
@obsolesce said in Uninstalling Programs (Windows 10) Using Powershell:
@black3dynamite said in Uninstalling Programs (Windows 10) Using Powershell:
@obsolesce said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."
Actually, no. It is almost always there for windows to see. Because most chocolatey installs actually use the default windows installer. Just with a /silent switch (or whatever is appropriate).
Oh, I thought it never did that. I must have just worked with a few that didn't.
Chocolatey does not put anything in there. But since most packages are just using the normal installer in silent mode, it is generally there.
Makes sense.
It's like that with every package I've installed. One example is salt minion. If you install that with chocolatey, then uninstall it via Windows control panel, then try installing it again with Chocolatey, Chocolatey thinks it's still installed because doing it through Windows never tells Chocolatey it was installed. You have to use the force switch to install it again with Chocolatey.
The same goes for all Chocolatey packages I've used... 7zip, Firefox, Chrome, etc.
We would have to purchase Pro or Business license for Chocolatey in order for it to know if packages was removed.
Package Synchronizer - Automatic Sync - keep installed packages synced up with software they are tracking when upgrades and uninstalls are performed outside of Chocolatey!
That would be handy. Do they have a trial for testing?
https://chocolatey.org/contact
Select Sales / Demo / Trial in Send message to -
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."
Actually, no. It is almost always there for windows to see. Because most chocolatey installs actually use the default windows installer. Just with a /silent switch (or whatever is appropriate).
so by this information, one of the above commands should have worked?
-
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."
Actually, no. It is almost always there for windows to see. Because most chocolatey installs actually use the default windows installer. Just with a /silent switch (or whatever is appropriate).
so by this information, one of the above commands should have worked?
Generally speaking, yes. But as noted, you should never have been doing it that way. You should always use the package manager that you used to install it in the first place. That is the point of using a package manager.
-
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."
Actually, no. It is almost always there for windows to see. Because most chocolatey installs actually use the default windows installer. Just with a /silent switch (or whatever is appropriate).
so by this information, one of the above commands should have worked?
Generally speaking, yes. But as noted, you should never have been doing it that way. You should always use the package manager that you used to install it in the first place. That is the point of using a package manager.
that makes sense. Thanks for clarifying
-
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@jaredbusch said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
@wrcombs said in Uninstalling Programs (Windows 10) Using Powershell:
@scottalanmiller said in Uninstalling Programs (Windows 10) Using Powershell:
Now, I thought that you had installed this via Chocolatey, not the Windows installer, though. Based on other threads.
I did install via Chocolatey does that have something to do with it?
Yes, a lot. Chocolatey is its own package management system. So Get-WmiObject knows nothing about it and can't interact with it. It's not "installed" in Windows terms, it's just "sitting there."
Actually, no. It is almost always there for windows to see. Because most chocolatey installs actually use the default windows installer. Just with a /silent switch (or whatever is appropriate).
so by this information, one of the above commands should have worked?
Not reliably. Only in the case, which might be "sometimes" and might be "often" and might be "almost always", where the one package manager used the other. So no matter how often it works, it's not "meant to work" and works only by coincidence. The coincidence might be really often, but it is still coincidence and not working by design.